Documentation ¶
Index ¶
- func Address(addr string) (string, error)
- func ArrayContainsString(a []string, e string) bool
- func ArrayDistinctInt(src []int) []int
- func ArrayIntersectString(a []string, b []string) []string
- func ArrayJoinInt(a []int, sep string) string
- func ArrayJoinUint32(a []uint32, sep string) string
- func ArrayReverseInt64(a []int64)
- func ArraySortAscInt(src []int)
- func ArraySortDescInt(src []int)
- func ArrayUnionString(a []string, b []string) []string
- func Certificate(host ...string) (tls.Certificate, error)
- func Extract(addr string) (string, error)
- func GetHttpClientIP(request *http.Request) string
- func GetTLSConfig(keyFile, certFile string) (*tls.Config, error)
- func GetTLSConfigByAddr(addr string) (*tls.Config, error)
- func GetUUIDV1() string
- func GetUUIDV1WithoutLine() string
- func IPs() []string
- func InitPointer(src reflect.Type) (dst reflect.Value)
- func InitWithZeroValue(src reflect.Type) (dst reflect.Value)
- func IsExported(name string) bool
- func IsExportedOrBuiltinType(t reflect.Type) bool
- func Listen(addr string, fn func(string) (net.Listener, error)) (net.Listener, error)
- func SetStructField(v interface{}, fieldValue interface{}, fieldNames ...string) bool
- func TrimSpaceAndSlash(s string) string
- type StructField
- func (sf *StructField) Bool() (bool, bool)
- func (sf *StructField) BoolE() (bool, bool, error)
- func (sf *StructField) Float64() (float64, bool)
- func (sf *StructField) Float64E() (float64, bool, error)
- func (sf *StructField) Int() (int, bool)
- func (sf *StructField) IntE() (int, bool, error)
- func (sf *StructField) Interface() (interface{}, bool)
- func (sf *StructField) String() (string, bool)
- func (sf *StructField) StringE() (string, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrayContainsString ¶
ArrayContainsString string contains
func ArrayIntersectString ¶
ArrayIntersectString string intersect
func ArrayJoinUint32 ¶
ArrayJoinUint32 join uint32 array
func ArrayUnionString ¶
ArrayUnionString string union
func Certificate ¶
func Certificate(host ...string) (tls.Certificate, error)
func GetHttpClientIP ¶
func GetTLSConfig ¶
GetTLSConfig by key and cert
func GetUUIDV1WithoutLine ¶
func GetUUIDV1WithoutLine() string
func InitWithZeroValue ¶
InitWithZeroValue init type with default value
func IsExported ¶
IsExported Is this an exported - upper case - name?
func IsExportedOrBuiltinType ¶
IsExportedOrBuiltinType Is this type exported or a builtin?
func Listen ¶
Listen takes addr:portmin-portmax and binds to the first available port Example: Listen("localhost:5000-6000", fn)
func SetStructField ¶
SetStructField v is ptr to struct
func TrimSpaceAndSlash ¶
TrimSpaceAndSlash 去除字符串前后 / 和 空格 如果不包含,则返回原字符串
Types ¶
type StructField ¶
type StructField struct { Field reflect.StructField FieldName string FieldValue reflect.Value IsExist bool }
func GetStructField ¶
func GetStructField(v interface{}, fieldNames ...string) *StructField
GetStructField get struct field
func (*StructField) Bool ¶
func (sf *StructField) Bool() (bool, bool)
func (*StructField) Float64 ¶
func (sf *StructField) Float64() (float64, bool)
func (*StructField) Int ¶
func (sf *StructField) Int() (int, bool)
func (*StructField) Interface ¶
func (sf *StructField) Interface() (interface{}, bool)
func (*StructField) String ¶
func (sf *StructField) String() (string, bool)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.