util

package
v0.0.0-...-1b5374a Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DigInvoke

func DigInvoke(function interface{}, opts ...dig.InvokeOption) error

DigInvoke ...

func DigProvide

func DigProvide(constructor interface{}, opts ...dig.ProvideOption) error

DigProvide ...

func FormatStr

func FormatStr(s string) string

FormatStr ...

func FormatStrs

func FormatStrs(ss []string) []string

FormatStrs ...

func FormatUID

func FormatUID(uid string) string

FormatUID ...

func FormatUIDs

func FormatUIDs(uids []string) []string

FormatUIDs ...

func HashBase64

func HashBase64(prefix string, ss ...string) string

HashBase64 generate a composite unique index value.

func ReadConfig

func ReadConfig(v interface{}, path ...string)

ReadConfig 指定配置文件并解析; 未指定配置文件则通过环境变量获取

func StringsFilter

func StringsFilter(ss []string, filter func(s string) bool) []string

StringsFilter ...

func StringsHas

func StringsHas(ss []string, filter func(s string) bool) bool

StringsHas ...

func UnixMS

func UnixMS(ts ...time.Time) int64

UnixMS returns a Unix time, the number of milliseconds elapsed since January 1, 1970 UTC.

Types

This section is empty.

Jump to

Keyboard shortcuts

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