se

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 12, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const FILEDIR = "/data/index/"

Variables

This section is empty.

Functions

func ArrayUnique

func ArrayUnique(arr []string) []string

func CopyFile

func CopyFile(src, dst string) (int64, error)

func DirCHeckAndMk

func DirCHeckAndMk(dir string)

func DumpJson

func DumpJson(filePath string, model interface{}) (bool, error)

func ExistFile

func ExistFile(path string) bool

ExistFile 判断所给的路径文件/文件夹是否存在

func FileExist

func FileExist(filePath string) bool

func GetMd5

func GetMd5(filePath string) string

func GetPath

func GetPath() string

获取当前程序目录

func GetWd

func GetWd() string

func IntToBytes

func IntToBytes(n int) []byte

func LoadJson

func LoadJson(filePath string, model interface{}) *interface{}

func StrToBytes

func StrToBytes(s string) []byte

func StrToMd5

func StrToMd5(str string) string

func Tmd5

func Tmd5() string

func Walk

func Walk(dirPath string) []string

Types

type FileHandler

type FileHandler struct {
	// contains filtered or unexported fields
}

func NewFileHandler

func NewFileHandler(field string) *FileHandler

一个字段一个文件

func (*FileHandler) ReadDocIdsArry

func (fh *FileHandler) ReadDocIdsArry(start, len int64) []int64

从start下标读取len个int64

func (*FileHandler) ReadInt64

func (fh *FileHandler) ReadInt64(start int64) int64

从指定的位置读取一个int64

func (*FileHandler) WriteInt64

func (fh *FileHandler) WriteInt64(value, start int64) int64

指定的地方写入int64,不传就获取文件最后的下标

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL