Versions in this module Expand all Collapse all v0 v0.9.9 Jun 2, 2024 Changes in this version + func GenerateImage(text string) ([]byte, error) + func RemoveExtension(filename string) string + func TrackTIme(pre time.Time) time.Duration v0.9.7 Dec 28, 2023 Changes in this version + const MimeSniffLen + var DefaultDirPerm os.FileMode = 0775 + var DefaultFileFlags = os.O_CREATE | os.O_WRONLY | os.O_APPEND + var DefaultFilePerm os.FileMode = 0665 + var DirExist = IsDir + var FileExist = IsFile + var ImageMimeTypes = map[string]string + var OnlyReadFileFlags = os.O_RDONLY + var OnlyReadFilePerm os.FileMode = 0444 + var PathExist = PathExists + func CheckPort(port int) bool + func ChickIsDir(path string) bool + func Compare(a, b string) bool + func Decode(in []byte, charset string) ([]byte, error) + func DecodeFileName(headerName string, ZipFilenameEncoding string) string + func DeleteFileIfExist(filePath string) error + func DetectUTF8(s string) (valid, require bool) + func FileExists(path string) bool + func GbkToUtf8(unknowString string) (string, error) + func GetAbsPath(path string) string + func GetAuthor(input string) (string, bool) + func GetContentTypeByFileName(fileName string) (contentType string) + func GetEncoding(charset string) (encoding.Encoding, bool) + func GetFreePort() (int, error) + func GetIPList() (IPList []string, err error) + func GetImageDataBlurHash(loadedImage []byte, components int) string + func GetImageDataBlurHashImage(loadedImage []byte, components int) []byte + func GetMainName(filename string) string + func GetOutboundIP() net.IP + func GuessText(unknowString string) (string, error) + func ImageAutoCrop(loadedImage []byte, energyThreshold float32) []byte + func ImageGray(loadedImage []byte) []byte + func ImageResize(loadedImage []byte, width int, height int) []byte + func ImageResizeByHeight(loadedImage []byte, height int) []byte + func ImageResizeByMaxHeight(loadedImage []byte, maxHeight int) ([]byte, error) + func ImageResizeByMaxWidth(loadedImage []byte, maxWidth int) ([]byte, error) + func ImageResizeByWidth(loadedImage []byte, width int) []byte + func ImageThumbnail(loadedImage []byte, width int, height int) []byte + func IsAbsPath(aPath string) bool + func IsDir(path string) bool + func IsExist(path string) bool + func IsFile(path string) bool + func IsImageFile(path string) bool + func IsZipFile(filepath string) bool + func MD5file(fName string) string + func MimeType(path string) (mime string) + func OpenBrowser(uri string) + func PathExists(path string) bool + func PrintAllReaderURL(Port int, OpenBrowserFlag bool, PrintAllPossibleQRCode bool, ServerHost string, ...) + func PrintQRCode(text string) + func ReaderMimeType(r io.Reader) (mime string) + func ShiftjisToUtf8(unknowString string) (string, error) + func Sort(l []string) + func ToGBK(str string) (string, error) + func ToShiftJIS(str string) (string, error) + type SystemStatus struct + CPUNumLogical int + CPUNumPhysical int + CPUUsedPercent float64 + Description string + MemoryFree uint64 + MemoryTotal uint64 + MemoryUsedPercent float64 + func GetSystemStatus() SystemStatus v0.9.7-1 Jan 10, 2024