Documentation ¶
Index ¶
- func AddExtensionFromUrl(filename string, url string) string
- func AddSuffixToNameBeforeExtension(prefix, path string) string
- func GetActualPath(dir, path string) string
- func GetDirFromPath(path string) string
- func GetExtensionFromURL(url string) string
- func GetFileLastModifyTime(path, format string) string
- func GetFileNameFromURL(url string) string
- func GetFileType(fSrc []byte) string
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsImage(bytes []byte) bool
- func IsImageExist(path string) bool
- func IsPathLegal(path string) bool
- func IsSameImage(path string, bytes []byte) bool
- func IsSupportedImageExt(ext string) bool
- func JoinPath(path string, name string) string
- func MakeErrorResp(w *http.ResponseWriter, msg string)
- func MakeResp(w *http.ResponseWriter, code int, msg string)
- func MakeSuccessResp(w *http.ResponseWriter, data interface{})
- func ReName(src, dst string) bool
- func Remove(path string) bool
- func SaveToDisk(file multipart.File, path string) bool
- func SetAllowCROS(w *http.ResponseWriter)
- func ToJSONStr(i interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddExtensionFromUrl ¶
func GetDirFromPath ¶
func GetExtensionFromURL ¶ added in v1.0.5
func GetFileLastModifyTime ¶
func GetFileNameFromURL ¶
func GetFileType ¶
GetFileType 用文件前面几个字节来判断 fSrc: 文件字节流(就用前面几个字节) 返回文件后缀类型,不包含点
func IsImageExist ¶
func IsPathLegal ¶
func IsSameImage ¶
func IsSupportedImageExt ¶ added in v1.0.9
IsSupportedImageExt 返回是否支持此图片后缀
func MakeErrorResp ¶
func MakeErrorResp(w *http.ResponseWriter, msg string)
func MakeSuccessResp ¶
func MakeSuccessResp(w *http.ResponseWriter, data interface{})
func SetAllowCROS ¶
func SetAllowCROS(w *http.ResponseWriter)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.