helper

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 10 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bind added in v0.10.3

func Bind(v interface{}, data maps.Map, vars ...*regexp.Regexp) interface{}

Bind 绑定数据

func EnvInt added in v0.10.2

func EnvInt(key interface{}, defaults ...int) int

EnvInt replace $ENV.xxx with the env and cast to the integer

func EnvString added in v0.10.2

func EnvString(key interface{}, defaults ...string) string

EnvString replace $ENV.xxx with the env

func ReadFile

func ReadFile(file io.Reader) ([]byte, error)

ReadFile 读取文件内容

func ReadFileString

func ReadFileString(file io.Reader) (string, error)

ReadFileString 读取文件内容, 返回String

func UnmarshalFile

func UnmarshalFile(file io.Reader, v interface{}) error

UnmarshalFile JSON Unmarshal

Types

This section is empty.

Jump to

Keyboard shortcuts

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