Documentation ¶
Index ¶
- Constants
- func First[T any](defaultArg T, args []T) T
- func GetBoolValue(m map[string]any, key string) (bool, bool)
- func GetFloatValue(m map[string]any, key string) (float64, bool)
- func GetIntValue(m map[string]any, key string) (int, bool)
- func GetInterfaceSlice(m map[string]any, key string) ([]any, bool)
- func GetStringSlice(m map[string]any, key string) ([]string, bool)
- func GetStringValue(m map[string]any, key string) (string, bool)
- func HttpDelete(url string, params any, opts ...RequestOption) ([]byte, error)
- func HttpDeleteWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
- func HttpGet(url string, params map[string]string, opts ...RequestOption) ([]byte, error)
- func HttpGetWith[T RespData](url string, params map[string]string, opts ...RequestOption) (T, error)
- func HttpPost(url string, params any, opts ...RequestOption) ([]byte, error)
- func HttpPostWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
- func HttpPut(url string, params any, opts ...RequestOption) ([]byte, error)
- func HttpPutWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
- func JsonParse[T any](data []byte) (T, error)
- func JsonString(data any) string
- func Max[T int | int32 | int64 | float32 | float64](a, b T) T
- func Min[T int | int32 | int64 | float32 | float64](a, b T) T
- func PathGlobPattern(pattern string) ([]string, error)
- func RandStr(ns ...int) string
- func ReadFile(path string) ([]byte, error)
- func TailFile(ctx context.Context, path string, lines chan<- string) error
- func UUID(ns ...int) string
- func WalkPath(path string, wildcards ...string) ([]string, error)
- func WriteFile(path string, buf []byte) error
- type RequestOption
- type RespData
Constants ¶
View Source
const ( TimeLayout = "2006-01-02 15:04:05" TimeLayoutMs = "2006-01-02 15:04:05.000" )
Variables ¶
This section is empty.
Functions ¶
func HttpDelete ¶ added in v1.5.0
func HttpDelete(url string, params any, opts ...RequestOption) ([]byte, error)
func HttpDeleteWith ¶ added in v1.5.0
func HttpDeleteWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
func HttpGetWith ¶ added in v1.5.0
func HttpPost ¶ added in v1.5.0
func HttpPost(url string, params any, opts ...RequestOption) ([]byte, error)
func HttpPostWith ¶ added in v1.5.0
func HttpPostWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
func HttpPut ¶ added in v1.5.0
func HttpPut(url string, params any, opts ...RequestOption) ([]byte, error)
func HttpPutWith ¶ added in v1.5.0
func HttpPutWith[T RespData](url string, params any, opts ...RequestOption) (T, error)
func JsonString ¶
func PathGlobPattern ¶
Types ¶
type RequestOption ¶ added in v1.5.2
Click to show internal directories.
Click to hide internal directories.