util

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFilterFile added in v1.1.0

func LoadFilterFile(filePath string) ([]string, error)

LoadFilterFile parses a file into an array of non-empty, non-comment lines. If the file does not exist, then os.IsNotExist(err) == true

func ParseCommaSeparatedParams

func ParseCommaSeparatedParams(params string) (map[string]string, error)

ParseCommaSeparatedParams slipts params in the form of "foo=bar,baz=qux" in to a map {"foo": "bar", "baz": "qux"}

func ValueFromJSON

func ValueFromJSON(v interface{}) (starlark.Value, error)

ValueFromJSON converts JSON value to starlark.Value.

func ValueFromNestedMap

func ValueFromNestedMap(m map[string]interface{}) (starlark.Value, error)

ValueFromNestedMap converts nested JSON map oject to starlark.Value.

Types

type StringsFlagValue added in v1.1.0

type StringsFlagValue []string

func StringsFlag added in v1.1.0

func StringsFlag(name string, value []string, usage string) *StringsFlagValue

func (*StringsFlagValue) Set added in v1.1.0

func (s *StringsFlagValue) Set(value string) error

func (*StringsFlagValue) String added in v1.1.0

func (s *StringsFlagValue) String() string

Jump to

Keyboard shortcuts

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