ext

package
v0.0.0-...-bb3bbde Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: MIT Imports: 6 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayContains

func ArrayContains(s []string, e string) bool

func FileExists

func FileExists(name string) bool

func FolderExists

func FolderExists(name string) bool

func ListInterfaceValueByTag

func ListInterfaceValueByTag(f interface{}, tagKey string) []interface{}

Parse struct value of pointer of an interface Example: ListTag(&structVariable, "csv")

func ListStringValueByTag

func ListStringValueByTag(f interface{}, tagKey string) []string

Parse struct value of pointer of an interface Example: ListTag(&structVariable, "csv")

func ListTagByKey

func ListTagByKey(f interface{}, tagKey string) []string

Get List Tag of pointer of an struct Example: ListTag(&structVariable, "csv")

func ReplaceEnv

func ReplaceEnv(s string) string

Replace ${VAR|default} by environment variable VAR or using "default" value if VAR is not set.

func VarMatch

func VarMatch(pattern string, input string) (map[string]Var, bool)

Match variables string Example:

/path/to/{name}
/path/to/{name:pattern}

func WildMatch

func WildMatch(pattern string, input string) bool

Match wildcard string

Types

type Var

type Var string

func (*Var) Bool

func (v *Var) Bool() bool

func (*Var) Float

func (v *Var) Float() float32

func (*Var) Float64

func (v *Var) Float64() float64

func (*Var) Int

func (v *Var) Int() int

func (*Var) Int64

func (v *Var) Int64() int64

func (*Var) String

func (v *Var) String() string

func (*Var) UInt

func (v *Var) UInt() uint

func (*Var) UInt64

func (v *Var) UInt64() uint64

Jump to

Keyboard shortcuts

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