utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEmptyValue

func IsEmptyValue(v reflect.Value) bool

func SortByKeys

func SortByKeys(m map[string]interface{}) map[string]interface{}

SortByKeys 递归地对map的键进行排序

func StructToMapJSONTag

func StructToMapJSONTag(item interface{}) map[string]interface{}

StructToMapJSONTag 根据json tag将struct转map

Types

type Debug

type Debug struct {
	// contains filtered or unexported fields
}

func NewDebug

func NewDebug(name string) *Debug

NewDebug 返回一个debug对象 通过环境变量开启debug功能 变量名:HUIFU_DEBUG 不同模块按`,`隔开,all表示全部开启 支持模块: pay: v2包 webhook: webhook包

func (*Debug) IsEnable

func (d *Debug) IsEnable() bool

func (*Debug) Printf

func (d *Debug) Printf(format string, args ...interface{})

Jump to

Keyboard shortcuts

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