util

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2022 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppTitle = "Clash.Mini"
)

Variables

This section is empty.

Functions

func ConvertForceByJson

func ConvertForceByJson(dv interface{}, ov interface{}) (err error)

ConvertForceByJson 通过JSON强制转换

func GetSubTitle

func GetSubTitle(subTitle string) string

func IgnoreErrorBytes

func IgnoreErrorBytes(data []byte, err error) []byte

IgnoreErrorBytes 忽略错误[]byte

func IgnoreErrorString

func IgnoreErrorString(data string, err error) string

IgnoreErrorString 忽略错误string

func JsonUnmarshal

func JsonUnmarshal(data []byte, v interface{})

JsonUnmarshal JSON字节数组转struct

func ToJsonString

func ToJsonString(v interface{}) string

ToJsonString struct转为JSON字符串

func ToLowerCamelCase

func ToLowerCamelCase(s string) string

ToLowerCamelCase 转小驼峰camelCase

func ToUpperCamelCase

func ToUpperCamelCase(s string) string

ToUpperCamelCase 转大驼峰CamelCase

func UnmarshalByValues

func UnmarshalByValues(str string, v interface{}) error

UnmarshalByValues 解码为struct

func UnmarshalByValuesWithTag

func UnmarshalByValuesWithTag(str string, fieldTag string, v interface{}) error

UnmarshalByValuesWithTag 解码为struct

Types

This section is empty.

Jump to

Keyboard shortcuts

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