pkg

package
v3.0.0-...-8a73552 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFoundKey = errors.New("not found key")
	ErrType        = errors.New("error type")
)

Functions

func BytesContain

func BytesContain(ele byte, b []byte) bool

func BytesToString

func BytesToString(b []byte) string

func DeepClone

func DeepClone(v interface{}) interface{}

func DeepCopy

func DeepCopy(dst, src interface{})

func Interface2Map

func Interface2Map(data interface{}) (result map[string]interface{})

Interface2Map 将嵌套的map[string]interface全部转换成一层

func String

func String(n int) string

String 随机指定长度的字符串

Types

type Param

type Param map[string]interface{}

func NewParam

func NewParam() Param

func (Param) Add

func (p Param) Add(key string, value interface{})

func (Param) Delete

func (p Param) Delete(key string) (ok bool)

func (Param) Get

func (p Param) Get(key string) (value interface{}, ok bool)

func (Param) GetInt64

func (p Param) GetInt64(key string) (n int64, err error)

func (Param) GetString

func (p Param) GetString(key string) (string, error)

func (Param) Range

func (p Param) Range(fn func(key string, value interface{}) (breakOut bool))

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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