Documentation ¶
Index ¶
- Constants
- func Contains(slice []string, item string) bool
- func Decompress(tarball, target string) error
- func DeleteFile(path string) error
- func DownloadFile(url, path, name string) error
- func DownloadFileToWriter(url string, writer io.Writer) error
- func GetFileNameByUrl(url string) string
- func GetRandomString() string
- func GetValueFromNestedMap(m map[string]interface{}, key string) (interface{}, bool)
- func IsFileExist(path string) bool
- func IsHttpUrl(url string) bool
- func Md5(str string) string
- func ReadFile(path string) ([]byte, error)
- func RenameFile(oldPath, newPath string) error
- func StructTransform(a, b any) error
- func TimeParse(timeStr string) (time.Time, error)
- func YamlToJson(yamlDatas ...string) (string, error)
- type File
Constants ¶
View Source
const ( Valid = 1 Invalid = 0 TokenKey = "oceanProjectTokenKey" UserIDKey = "oceanProjectUserIdKey" )
user state
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
解压文件 param1: tarball: 压缩文件路径 param2: target: 解压目标路径
func DownloadFileToWriter ¶
通过一个http url下载文件, 文件路径和文件名字
func GetValueFromNestedMap ¶
func StructTransform ¶
Types ¶
type File ¶
type File struct {
// contains filtered or unexported fields
}
func (*File) ClearFileContent ¶
func (*File) GetFileFullPath ¶
func (*File) GetFileName ¶
func (*File) GetFilePath ¶
Click to show internal directories.
Click to hide internal directories.