utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApiSign added in v0.0.9

func ApiSign(url string, secret string) string

func HasErr

func HasErr(err error, errCode fmt.Stringer) bool

func HasWar

func HasWar(err error, errCode fmt.Stringer) bool

func JsonDisplay added in v0.0.7

func JsonDisplay(obj any)

func JsonString

func JsonString(params any) string

func OpenFreeUDPPort

func OpenFreeUDPPort(portBase int, num int) (net.PacketConn, int, error)

OpenFreeUDPPort opens free UDP port This example does not actually use UDP ports, but to avoid port collisions with the HTTP server, it binds the same number of UDP port in advance.

func Success

func Success(status int) bool

func TransStrToImage added in v0.1.0

func TransStrToImage(sourceString string, imageName string) error

TransStrToImage base64 字符串转图片

func TransToByte

func TransToByte(params any) []byte

Types

This section is empty.

Directories

Path Synopsis
Package concurrency contain some functions to support concurrent programming.
Package concurrency contain some functions to support concurrent programming.
Package condition contains some functions for conditional judgment.
Package condition contains some functions for conditional judgment.
Package convertor implements some functions to convert data.
Package convertor implements some functions to convert data.
Package cryptor implements some util functions to encrypt and decrypt.
Package cryptor implements some util functions to encrypt and decrypt.
Package datastructure implements some data structure.
Package datastructure implements some data structure.
hashmap
Package datastructure implements some data structure.
Package datastructure implements some data structure.
heap
Package datastructure implements some data structure.
Package datastructure implements some data structure.
list
Package datastructure implements some data structure.
Package datastructure implements some data structure.
set
Package datetime implements some functions to format date and time.
Package datetime implements some functions to format date and time.
Package fileutil implements some basic functions for file operations
Package fileutil implements some basic functions for file operations
Package formatter implements some functions to format string, struct.
Package formatter implements some functions to format string, struct.
Package function implements some functions for control the function execution and some is for functional programming.
Package function implements some functions for control the function execution and some is for functional programming.
Package internal is for internal use.
Package internal is for internal use.
Package iterator provides a way to iterate over values stored in containers.
Package iterator provides a way to iterate over values stored in containers.
Package lancetconstraints contain some comstomer constraints.
Package lancetconstraints contain some comstomer constraints.
Package maputil includes some functions to manipulate map.
Package maputil includes some functions to manipulate map.
Package mathutil implements some functions for math calculation.
Package mathutil implements some functions for math calculation.
Package netutil implements some basic functions to send http request and get ip info.
Package netutil implements some basic functions to send http request and get ip info.
Package random implements some basic functions to generate random int and string.
Package random implements some basic functions to generate random int and string.
test command
Package retry is for executing a function repeatedly until it was successful or canceled by the context.
Package retry is for executing a function repeatedly until it was successful or canceled by the context.
Package slice implements some functions to manipulate slice.
Package slice implements some functions to manipulate slice.
Package strutil implements some functions to manipulate string.
Package strutil implements some functions to manipulate string.
Package system contain some functions about os, runtime, shell command.
Package system contain some functions about os, runtime, shell command.
Package validator implements some validate function for string.
Package validator implements some validate function for string.
Package xerror implements helpers for errors
Package xerror implements helpers for errors

Jump to

Keyboard shortcuts

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