Documentation ¶
Index ¶
- Constants
- func CacheDir() string
- func GetEnvInt(name string, def int) int
- func GetEnvString(name string, def string) string
- func GetUUID() string
- func GetUUIDv4() string
- func HostName() (hostname string)
- func Int16ToInt64(bs []int16) (in int64)
- func IsBigEndian() bool
- func IsLittleEndian() bool
- func PathExist(path string) bool
- func String(length int) string
- func StringWithCharset(length int, charset Charset) string
- type Charset
- type JSONObject
- type StringSlice
Constants ¶
View Source
const DASH = "-"
Variables ¶
This section is empty.
Functions ¶
func GetEnvString ¶
func GetUUID ¶
func GetUUID() string
GetUUID generates a UUID/GUID (version 1 format) using the satori/go.uuid package
func GetUUIDv4 ¶
func GetUUIDv4() string
GetUUIDv4 generates a UUID/GUID (version 4 format) using the satori/go.uuid package
func Int16ToInt64 ¶
func IsBigEndian ¶
func IsBigEndian() bool
func IsLittleEndian ¶
func IsLittleEndian() bool
func StringWithCharset ¶
StringWithCharset support rand string you defined
Types ¶
type Charset ¶
type Charset string
Charset is string type
const ( // Alphanumeric contain Alphabetic and Numeric Alphanumeric Charset = Alphabetic + Numeric // Alphabetic is \w+ \W Alphabetic Charset = "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // Numeric is number list Numeric Charset = "0123456789" // Hex is Hexadecimal Hex Charset = Numeric + "abcdef" )
type JSONObject ¶
type JSONObject map[string]interface{}
func (JSONObject) Bool ¶
func (c JSONObject) Bool(k interface{}, def bool) bool
func (JSONObject) Int ¶
func (c JSONObject) Int(k interface{}, def int) int
func (JSONObject) Object ¶
func (c JSONObject) Object(k interface{}) JSONObject
func (JSONObject) Set ¶
func (c JSONObject) Set(k interface{}, v interface{}) JSONObject
func (JSONObject) String ¶
func (c JSONObject) String(k interface{}, def string) string
type StringSlice ¶
type StringSlice []string
StringSlice ...
func (StringSlice) Add ¶
func (s StringSlice) Add(str string) ([]string, bool)
Add adds the str to the slice.
func (StringSlice) Has ¶
func (s StringSlice) Has(str string) bool
Has returns whether the str is in the slice.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.