Documentation ¶
Index ¶
- Constants
- Variables
- func ArgFilter(keys []string) []string
- func BuildDir(absDir string) error
- func CheckFileIsExist(filename string) bool
- func CompressImageResource(data []byte) []byte
- func Copy(toValue interface{}, fromValue interface{}) (err error)
- func CopyFile(src, des string) error
- func CopyWithOption(toValue interface{}, fromValue interface{}, opt Option) (err error)
- func DeleteFile(absDir string) error
- func DumpStack(msg string) string
- func GetCurrentDirectory() string
- func GetModelPath() string
- func GetPathDirs(absDir string) (re []string)
- func GetPathFiles(absDir string) (re []string)
- func MoveFile(from, to string) error
- func ReadFile(fname string) (src []string)
- func SaveToFile(fname string, src []string, isClear bool) bool
- func StructCopy(from, to interface{})
- func ToRealPage(Size, pageIdx uint64) (uint64, uint64, error)
- func TopageLimit(Size, pageIdx uint) (string, error)
- func WriteFile(fname string, src []string, isClear bool) bool
- type Option
- type Page
- type TypeConverter
Constants ¶
View Source
const ( // Some default converter types for a nicer syntax String string = "" Bool bool = false Int int = 0 Float32 float32 = 0 Float64 float64 = 0 )
These flags define options for tag handling
Variables ¶
View Source
var ( ErrInvalidCopyDestination = errors.New("copy destination is invalid") ErrInvalidCopyFrom = errors.New("copy from is invalid") ErrMapKeyNotMatch = errors.New("map's key type doesn't match") ErrNotSupported = errors.New("not supported") ErrFieldNameTagStartNotUpperCase = errors.New("copier field name tag must be start upper case") )
Functions ¶
func CompressImageResource ¶
func CopyWithOption ¶
CopyWithOption copy with option
func StructCopy ¶
func StructCopy(from, to interface{})
func TopageLimit ¶
Types ¶
type Option ¶
type Option struct { // setting this value to true will ignore copying zero values of all the fields, including bools, as well as a // struct having all it's fields set to their zero values respectively (see IsZero() in reflect/value.go) IgnoreEmpty bool DeepCopy bool Converters []TypeConverter }
Option sets copy options
type Page ¶
func (*Page) TopageLimit ¶
type TypeConverter ¶
type TypeConverter struct { SrcType interface{} DstType interface{} Fn func(src interface{}) (dst interface{}, err error) }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package decimal implements an arbitrary precision fixed-point decimal.
|
Package decimal implements an arbitrary precision fixed-point decimal. |
driver
nolint
|
nolint |
** description("").
|
** description(""). |
naming
|
|
Package snowflake provides a very simple Twitter snowflake generator and parser.
|
Package snowflake provides a very simple Twitter snowflake generator and parser. |
* @Author: * @Date: 2022-12-21 12:39:14 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-12-23 11:23:36 * @Description:
|
* @Author: * @Date: 2022-12-21 12:39:14 * @LastEditors: Please set LastEditors * @LastEditTime: 2022-12-23 11:23:36 * @Description: |
Click to show internal directories.
Click to hide internal directories.