Documentation ¶
Index ¶
- Constants
- func Cmd(commandName string, params []string) (string, error)
- func CmdDir(dir string, commandName string, params []string) (string, error)
- func CmdDirToShow(dir string, commandName string, params []string, f func(string)) error
- func Either(list ...string) string
- func GetDate() string
- func GetRunTime() string
- func IsRelease() bool
- func PrintBanner(name string)
- func Random(l int, randomRange string) string
- func Random09(l int) string
- func Random0Z(l int) string
- func RandomI(min int, max int) int
- func RandomI64(min int, max int) int64
- func Retry(fc func() error, maxRetries int, interval time.Duration) error
- type TraceHeader
- type TypeTransform
Constants ¶
View Source
const ( XRequestId = "x-request-id" XB3TraceId = "x-b3-traceid" XB3SpanId = "x-b3-spanid" XB3ParentSpanId = "x-b3-parentspanid" XB3Sampled = "x-b3-sampled" XB3Flags = "x-b3-flags" B3 = "b3" XOtSpanContext = "x-ot-span-context" )
View Source
const (
ReleaseEnv = "onl"
)
Variables ¶
This section is empty.
Functions ¶
func CmdDirToShow ¶ added in v2.0.9
CmdDirToShow 指定目录执行命令,并且处理每一条返回
func PrintBanner ¶ added in v2.0.2
func PrintBanner(name string)
Types ¶
type TraceHeader ¶ added in v2.0.2
func SetGrpc ¶ added in v2.0.2
func SetGrpc(ctx context.Context) *TraceHeader
func SetHeader ¶ added in v2.0.2
func SetHeader(header interface{}) *TraceHeader
func SetHttp ¶ added in v2.0.2
func SetHttp(header http.Header) *TraceHeader
type TypeTransform ¶ added in v2.0.2
type TypeTransform struct {
Value interface{}
}
func Transform ¶ added in v2.0.2
func Transform(v interface{}) *TypeTransform
func (*TypeTransform) Bool ¶ added in v2.0.2
func (t *TypeTransform) Bool() bool
func (*TypeTransform) Float64 ¶ added in v2.0.2
func (t *TypeTransform) Float64() float64
func (*TypeTransform) Int ¶ added in v2.0.2
func (t *TypeTransform) Int() int
func (*TypeTransform) Int64 ¶ added in v2.0.2
func (t *TypeTransform) Int64() int64
func (*TypeTransform) Slice ¶ added in v2.0.2
func (t *TypeTransform) Slice() []interface{}
func (*TypeTransform) SliceString ¶ added in v2.0.2
func (t *TypeTransform) SliceString() []string
func (*TypeTransform) String ¶ added in v2.0.2
func (t *TypeTransform) String() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.