util

package
v0.0.0-...-4f87869 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvAny

func GetEnvAny(names ...string) string

func GetEnvAnyWithDefault

func GetEnvAnyWithDefault(defaultEnv string, names ...string) string

func Json2Object

func Json2Object(s string, v interface{}) error

func JsonBytesX2Object

func JsonBytesX2Object(s []byte, v interface{}) error

func JsonX2Object

func JsonX2Object(s string, v interface{}) error

func Object2Json

func Object2Json(v interface{}) (string, error)

func Object2JsonBytes

func Object2JsonBytes(v interface{}) ([]byte, error)

func Object2PrettyJson

func Object2PrettyJson(v interface{}) (string, error)

func PrettyJson

func PrettyJson(s string) string

func PrettyJsonBytes

func PrettyJsonBytes(s []byte) []byte

func ReadWithDefault

func ReadWithDefault(r io.Reader, fallback string) string

func RegexNamedMatch

func RegexNamedMatch(input string, pattern string) map[string]string

func TemplateRender

func TemplateRender(src string, context interface{}) (string, error)

func TemplateRenderByPong2

func TemplateRenderByPong2(tpl string, context map[string]interface{}) (string, error)

func Url

func Url(args ...string) string

func UrlWithSeparator

func UrlWithSeparator(sep string, args ...string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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