Documentation ¶
Index ¶
- Variables
- func AppendInt(buf []byte, u uint64) []byte
- func AppendUniqueString(to []string, from string) []string
- func AppendUniqueStrings(to []string, from []string) []string
- func BBlack(s interface{}, attribs ...AttribCode) string
- func BBlue(s interface{}, attribs ...AttribCode) string
- func BCyan(s interface{}, attribs ...AttribCode) string
- func BGreen(s interface{}, attribs ...AttribCode) string
- func BMagenta(s interface{}, attribs ...AttribCode) string
- func BRed(s interface{}, attribs ...AttribCode) string
- func BWhite(s interface{}, attribs ...AttribCode) string
- func BYellow(s interface{}, attribs ...AttribCode) string
- func Base64(data []byte) string
- func Base64String(data string) string
- func Black(s interface{}, attribs ...AttribCode) string
- func Blue(s interface{}, attribs ...AttribCode) string
- func Bool(value interface{}) bool
- func Bytes(value interface{}) []byte
- func CheckPath(fileName string)
- func Color(s interface{}, textColor TextColor, bgColor BgColor, attribs ...AttribCode) string
- func Convert(from, to interface{})
- func CopyFile(from, to string) error
- func CopyToFile(from io.Reader, to string) error
- func Cyan(s interface{}, attribs ...AttribCode) string
- func DecodeInt(buf []byte) uint64
- func DecryptAes(crypted string, key []byte, iv []byte) (out string)
- func DecryptAesBytes(crypted string, key []byte, iv []byte) (out []byte)
- func Dim(s interface{}) string
- func Duration(value string) time.Duration
- func EncodeInt(u uint64) []byte
- func EncryptAes(origData string, key []byte, iv []byte) (out string)
- func EncryptAesBytes(origData []byte, key []byte, iv []byte) (out string)
- func FileExists(fileName string) bool
- func FillInt(buf []byte, length int) []byte
- func FinalType(v reflect.Value) reflect.Type
- func FinalValue(v reflect.Value) reflect.Value
- func FixJsonBytes(b []byte) []byte
- func FixNilValue(v reflect.Value)
- func FixPath(path string) string
- func FixPtr(value interface{}) interface{}
- func FixUpperCase(data []byte, excludesKeys []string)
- func FixedJson(value interface{}) string
- func FixedJsonP(value interface{}) string
- func Float(value interface{}) float32
- func Float64(value interface{}) float64
- func Floats(value interface{}) []float64
- func GetLowerName(s string) string
- func GetUpperName(s string) string
- func Green(s interface{}, attribs ...AttribCode) string
- func Id10() string
- func Id12() string
- func Id6() string
- func Id8() string
- func If(i bool, a, b interface{}) interface{}
- func In(arr []interface{}, s interface{}) bool
- func Int(value interface{}) int
- func Int64(value interface{}) int64
- func Ints(value interface{}) []int64
- func Italic(s interface{}) string
- func JoinArgs(arr []string, sep string) string
- func Json(value interface{}) string
- func JsonBytes(value interface{}) []byte
- func JsonBytesP(value interface{}) []byte
- func JsonP(value interface{}) string
- func Load(fileName string, to interface{}) error
- func LoadJson(fileName string, to interface{}) error
- func LoadX(fileName string, to interface{}) error
- func LoadYaml(fileName string, to interface{}) error
- func MD5(data []byte) []byte
- func MD5Base64(data string) string
- func MD5String(data string) string
- func Magenta(s interface{}, attribs ...AttribCode) string
- func MakeToken(size int) []byte
- func NewIntEncoder(digits string, radix uint8) (*intEncoder, error)
- func ParseInt(s string) int64
- func ParseUint(s string) uint64
- func ReadFile(fileName string, maxLen uint) (string, error)
- func ReadFileBytes(fileName string, maxLen uint) ([]byte, error)
- func ReadFileLines(fileName string) ([]string, error)
- func RealValue(v reflect.Value) reflect.Value
- func Red(s interface{}, attribs ...AttribCode) string
- func RunCommand(command string, args ...string) ([]string, error)
- func Save(fileName string, data interface{}) error
- func SaveJson(fileName string, data interface{}) error
- func SaveJsonP(fileName string, data interface{}) error
- func SaveYaml(fileName string, data interface{}) error
- func SetValue(to, from reflect.Value)
- func Sha1(data []byte) []byte
- func Sha1Base64(data string) string
- func Sha1String(data string) string
- func Sha256(data []byte) []byte
- func Sha256Base64(data string) string
- func Sha256String(data string) string
- func Sha512(data []byte) []byte
- func Sha512Base64(data string) string
- func Sha512String(data string) string
- func ShortUniqueId() string
- func SplitArgs(s string) []string
- func SplitTrim(s, sep string) []string
- func SplitWithoutNone(s, sep string) []string
- func String(value interface{}) string
- func StringIf(i bool, a, b string) string
- func StringIn(arr []string, s string) bool
- func Strings(value interface{}) []string
- func Switch(i uint, args ...interface{}) interface{}
- func ToInterfaceArray(in interface{}) []interface{}
- func Uint(value interface{}) uint
- func Uint64(value interface{}) uint64
- func UnBase64(data string) []byte
- func UnBase64String(data string) string
- func UnJson(str string, value interface{}) interface{}
- func UnJsonArr(str string) []interface{}
- func UnJsonBytes(data []byte, value interface{}) interface{}
- func UnJsonMap(str string) map[string]interface{}
- func UnUrlBase64(data string) []byte
- func UnUrlBase64String(data string) string
- func UnYaml(data string, value interface{}) interface{}
- func UnYamlArr(data string) []interface{}
- func UnYamlMap(data string) map[string]interface{}
- func UniqueId() string
- func UrlBase64(data []byte) string
- func UrlBase64String(data string) string
- func ValueToString(v reflect.Value) string
- func White(s interface{}, attribs ...AttribCode) string
- func WriteFile(fileName string, content string) error
- func WriteFileBytes(fileName string, content []byte) error
- func Yaml(value interface{}) string
- func Yellow(s interface{}, attribs ...AttribCode) string
- type Aes
- func (_this *Aes) DecryptBase64ToBytes(data string) []byte
- func (_this *Aes) DecryptBase64ToString(data string) string
- func (_this *Aes) DecryptBytes(data []byte) (out []byte)
- func (_this *Aes) DecryptHexToBytes(data string) []byte
- func (_this *Aes) DecryptHexToString(data string) string
- func (_this *Aes) DecryptUrlBase64ToBytes(data string) []byte
- func (_this *Aes) DecryptUrlBase64ToString(data string) string
- func (_this *Aes) EncryptBytes(data []byte) (out []byte)
- func (_this *Aes) EncryptBytesToBase64(data []byte) string
- func (_this *Aes) EncryptBytesToHex(data []byte) string
- func (_this *Aes) EncryptBytesToUrlBase64(data []byte) string
- func (_this *Aes) EncryptStringToBase64(data string) string
- func (_this *Aes) EncryptStringToHex(data string) string
- func (_this *Aes) EncryptStringToUrlBase64(data string) string
- type AttribCode
- type BgColor
- type StructInfo
- type TextColor
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func AppendUniqueString ¶ added in v0.1.17
func AppendUniqueStrings ¶ added in v0.1.17
func BBlack ¶
func BBlack(s interface{}, attribs ...AttribCode) string
func BBlue ¶
func BBlue(s interface{}, attribs ...AttribCode) string
func BCyan ¶
func BCyan(s interface{}, attribs ...AttribCode) string
func BGreen ¶
func BGreen(s interface{}, attribs ...AttribCode) string
func BMagenta ¶
func BMagenta(s interface{}, attribs ...AttribCode) string
func BRed ¶
func BRed(s interface{}, attribs ...AttribCode) string
func BWhite ¶
func BWhite(s interface{}, attribs ...AttribCode) string
func BYellow ¶
func BYellow(s interface{}, attribs ...AttribCode) string
func Base64String ¶ added in v0.5.40
func Black ¶
func Black(s interface{}, attribs ...AttribCode) string
func Blue ¶
func Blue(s interface{}, attribs ...AttribCode) string
func Color ¶
func Color(s interface{}, textColor TextColor, bgColor BgColor, attribs ...AttribCode) string
func Cyan ¶
func Cyan(s interface{}, attribs ...AttribCode) string
func DecryptAesBytes ¶ added in v0.1.17
func EncryptAesBytes ¶ added in v0.1.17
func FileExists ¶ added in v0.0.8
func FixJsonBytes ¶ added in v0.5.40
修复Golang中Json默认处理HTML转义 < > & 的问题
func FixNilValue ¶ added in v0.1.9
func FixUpperCase ¶
func FixedJsonP ¶ added in v0.5.40
func FixedJsonP(value interface{}) string
func GetLowerName ¶ added in v0.1.9
func GetUpperName ¶ added in v0.1.9
func Green ¶
func Green(s interface{}, attribs ...AttribCode) string
func JsonBytesP ¶ added in v0.5.40
func JsonBytesP(value interface{}) []byte
func Magenta ¶
func Magenta(s interface{}, attribs ...AttribCode) string
func NewIntEncoder ¶
func ReadFileBytes ¶ added in v0.5.30
func ReadFileLines ¶ added in v0.1.15
func Red ¶
func Red(s interface{}, attribs ...AttribCode) string
func Sha1Base64 ¶ added in v0.1.17
func Sha1String ¶ added in v0.1.17
func Sha256Base64 ¶ added in v0.1.17
func Sha256String ¶ added in v0.1.17
func Sha512Base64 ¶ added in v0.1.17
func Sha512String ¶ added in v0.1.17
func ShortUniqueId ¶ added in v0.0.10
func ShortUniqueId() string
func SplitWithoutNone ¶ added in v0.1.17
func ToInterfaceArray ¶ added in v0.1.17
func ToInterfaceArray(in interface{}) []interface{}
func UnBase64String ¶ added in v0.5.40
func UnJsonBytes ¶ added in v0.5.40
func UnJsonBytes(data []byte, value interface{}) interface{}
func UnUrlBase64 ¶ added in v0.5.40
func UnUrlBase64String ¶ added in v0.5.40
func UrlBase64String ¶ added in v0.5.40
func ValueToString ¶ added in v0.1.10
func White ¶
func White(s interface{}, attribs ...AttribCode) string
func WriteFileBytes ¶ added in v0.5.30
func Yellow ¶
func Yellow(s interface{}, attribs ...AttribCode) string
Types ¶
type Aes ¶ added in v0.5.40
type Aes struct {
// contains filtered or unexported fields
}
func (*Aes) DecryptBase64ToBytes ¶ added in v0.5.40
func (*Aes) DecryptBase64ToString ¶ added in v0.5.40
func (*Aes) DecryptBytes ¶ added in v0.5.40
func (*Aes) DecryptHexToBytes ¶ added in v0.5.40
func (*Aes) DecryptHexToString ¶ added in v0.5.40
func (*Aes) DecryptUrlBase64ToBytes ¶ added in v0.5.40
func (*Aes) DecryptUrlBase64ToString ¶ added in v0.5.40
func (*Aes) EncryptBytes ¶ added in v0.5.40
func (*Aes) EncryptBytesToBase64 ¶ added in v0.5.40
func (*Aes) EncryptBytesToHex ¶ added in v0.5.40
func (*Aes) EncryptBytesToUrlBase64 ¶ added in v0.5.40
func (*Aes) EncryptStringToBase64 ¶ added in v0.5.40
func (*Aes) EncryptStringToHex ¶ added in v0.5.40
func (*Aes) EncryptStringToUrlBase64 ¶ added in v0.5.40
type AttribCode ¶
type AttribCode int
const ( AttrNone AttribCode = iota AttrBold AttrDim AttrItalic AttrUnderline AttrBlink AttrFastBlink AttrReverse AttrHidden AttrCrossedOut )
type StructInfo ¶ added in v0.5.43
type StructInfo struct { Fields []reflect.StructField Values map[string]reflect.Value Methods []reflect.Method MethodValues map[string]reflect.Value }
func FlatStruct ¶ added in v0.5.43
func FlatStruct(data interface{}) *StructInfo
func FlatStructWithUnexported ¶ added in v0.5.43
func FlatStructWithUnexported(data interface{}) *StructInfo
Source Files ¶
Click to show internal directories.
Click to hide internal directories.