util

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyFile

func CopyFile(dest string, src string)

func DecodeBase64

func DecodeBase64(s string) string

func EnsureFileFolderExists

func EnsureFileFolderExists(path string)

func FileExist

func FileExist(path string) bool

func FilterQuery

func FilterQuery(urlString string, blackList []string) string

func FloatsToStrings

func FloatsToStrings(floatArray []float64) []string

func GenerateId

func GenerateId() string

func GetCurrentTime

func GetCurrentTime() string

func GetCurrentTimeEx

func GetCurrentTimeEx(timestamp string) string

func GetIPFromRequest

func GetIPFromRequest(req *http.Request) string

func GetIPInfo

func GetIPInfo(clientIP string) string

func GetId

func GetId(owner, name string) 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 GetRandomColor

func GetRandomColor() string

func GetRandomName

func GetRandomName() string

func GetUploadCsvPath

func GetUploadCsvPath(fileId string) string

func GetUploadFilePath

func GetUploadFilePath(fileId string) string

func GetUploadXlsxPath

func GetUploadXlsxPath(fileId string) string

func IndexAt

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

func JsonToStruct

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

func ListFiles

func ListFiles(path string) []string

func LoadCsvFile

func LoadCsvFile(path string, rows *[][]string)

func LoadFactorFileByCsv

func LoadFactorFileByCsv(path string) ([]string, [][]float64)

func LoadFactorFileByCsv2

func LoadFactorFileByCsv2(path string) ([]string, [][]float64)

func LoadFactorFileBySpace

func LoadFactorFileBySpace(path string) ([]string, [][]float64)

func MixColor

func MixColor(c1 color.RGBA, c2 color.RGBA, t float64) color.RGBA

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 SafeGoroutine

func SafeGoroutine(fn func())

func StringsToFloats

func StringsToFloats(stringArray []string) []float64

func StructToJson

func StructToJson(v interface{}) string

func WriteBytesToPath

func WriteBytesToPath(b []byte, path string)

func WriteCsvFile

func WriteCsvFile(path string, rows *[][]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