 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
author: sunsc time: 2015-07-29 positon:ShangHai License: MIT
Index ¶
- Constants
- func Bool(value interface{}) bool
- func Bytes(val interface{}) []byte
- func Convert(value interface{}, t reflect.Kind) (interface{}, error)
- func Duration(val interface{}) time.Duration
- func FindString(eles []string, ele string, skip int) int
- func Float64(val interface{}) float64
- func GenerateStringSlice(element string, size int) []string
- func Int64(val interface{}) int64
- func IsLeapYear(year int) bool
- func IsLegalMD5Code(code string) bool
- func JoinStringSlices(slice1, slice2 []string, sep string) string
- func List(val interface{}) []interface{}
- func Map(val interface{}) map[string]interface{}
- func MonthDays(year, month int) int
- func ParseJoinedStringSlice(s, sep string) (all, slice1, slice2 []string)
- func RandString(slice []string) string
- func Recover(desc string)
- func RemoveDuplicate(slice []string) []string
- func RoundFloat64(val float64, prec int) float64
- func String(val interface{}) string
- func Time(val interface{}) time.Time
- func Uint64(val interface{}) uint64
- type Value
- func (this Value) As(value interface{}) (err error)
- func (this Value) Bool() bool
- func (this Value) Byte() byte
- func (this Value) Bytes() []byte
- func (this Value) Duration() time.Duration
- func (this Value) Float32() float32
- func (this Value) Float64() float64
- func (this Value) Int() int
- func (this Value) Int16() int16
- func (this Value) Int32() int32
- func (this Value) Int64() int64
- func (this Value) Int8() int8
- func (this Value) IsEmpty() bool
- func (this Value) String() string
- func (this Value) Time() time.Time
- func (this Value) UInt() uint
- func (this Value) UInt16() uint16
- func (this Value) UInt32() uint32
- func (this Value) UInt64() uint64
- func (this Value) UInt8() uint8
 
Constants ¶
      View Source
      
  
const ( KindTime reflect.Kind = iota + 1000000000 KindDuration )
Variables ¶
This section is empty.
Functions ¶
func Bool ¶
func Bool(value interface{}) bool
    Tries to convert the argument into a bool. Returns false if any error occurs.
func Bytes ¶
func Bytes(val interface{}) []byte
    Tries to convert the argument into a []byte array. Returns []byte{} if any error occurs.
func Duration ¶
Tries to convert the argument into a time.Duration value. Returns time.Duration(0) if any error occurs.
func Float64 ¶
func Float64(val interface{}) float64
    Tries to convert the argument into a float64. Returns float64(0.0) if any error occurs.
func GenerateStringSlice ¶
func Int64 ¶
func Int64(val interface{}) int64
    Tries to convert the argument into an int64. Returns int64(0) if any error occurs.
func IsLeapYear ¶
func IsLegalMD5Code ¶
func JoinStringSlices ¶
func ParseJoinedStringSlice ¶
func RandString ¶
func RemoveDuplicate ¶
func String ¶
func String(val interface{}) string
    Tries to convert the argument into a string. Returns "" if any error occurs.
Types ¶
 Click to show internal directories. 
   Click to hide internal directories.