util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureFileFolderExists

func EnsureFileFolderExists(path string)

func FileExist

func FileExist(path string) bool

func GenerateId

func GenerateId() string

func GenerateNumber

func GenerateNumber(min int, max int) string

func GetCurrentTime

func GetCurrentTime() string

func GetIdFromOwnerAndName

func GetIdFromOwnerAndName(owner string, name string) string

func GetOwnerAndNameFromId

func GetOwnerAndNameFromId(id string) (string, string)

func GetOwnerAndNameFromId3

func GetOwnerAndNameFromId3(id string) (string, string, string)

func GetOwnerAndNameFromId3New

func GetOwnerAndNameFromId3New(id string) (string, string, string)

func GetPath

func GetPath(path string) string

func IndexAt

func IndexAt(s, sep string, n int) int

func IsChinese

func IsChinese(str string) bool

func JsonToStruct

func JsonToStruct(data string, v interface{}) error

func ListFiles

func ListFiles(path string) []string

func ParseFloat

func ParseFloat(s string) float64

func ParseInt

func ParseInt(s string) int

func ParseIntWithError

func ParseIntWithError(s string) (int, error)

func ReadBytesFromPath

func ReadBytesFromPath(path string) []byte

func ReadStringFromPath

func ReadStringFromPath(path string) string

func RemoveExt

func RemoveExt(filename string) string

func StructToJson

func StructToJson(v interface{}) string

func StructToJsonCompact

func StructToJsonCompact(v interface{}) string

func WriteBytesToPath

func WriteBytesToPath(b []byte, path string)

func WriteStringToPath

func WriteStringToPath(s string, path string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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