Documentation ¶
Index ¶
- Constants
- Variables
- func BytesToString(b []byte) string
- func Exists(path string) bool
- func Get(url string) *requests.Response
- func GetNow(layout string) string
- func InSlice[T comparable](arr []T, t T) bool
- func InitViper(name string) error
- func ReadLines(name string) []string
- func RecoverError(funcs ...func())
- func StringToBytes(s string) []byte
- func TimeFormat(layout, t string) string
- func Uint64ToByte(num uint64) []byte
- func Unique[T comparable](arr []T) []T
- func WriteLines(name string, lines []string)
- func Xpath(html string, expr string) []string
- type Config
Constants ¶
View Source
const ( TimeLayout1 = "2006-01-02 15:04:05" TimeLayout2 = "20060102150405" )
Variables ¶
View Source
var Local = time.FixedZone("CST", 8*3600)
Functions ¶
func BytesToString ¶
BytesToString converts byte slice to string without a memory allocation.
func InSlice ¶
func InSlice[T comparable](arr []T, t T) bool
func RecoverError ¶
func RecoverError(funcs ...func())
func StringToBytes ¶
StringToBytes converts string to byte slice without a memory allocation.
func TimeFormat ¶
func Uint64ToByte ¶
func Unique ¶
func Unique[T comparable](arr []T) []T
func WriteLines ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.