util

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Indent

func Indent(text, indent string) string

Indent indents a block of text with an indent string.

func JoinSorted

func JoinSorted(values map[string]string, valueSeparator string, keySeparator string) string

JoinSorted takes map of keys and values, sorts them by keys and joins with given separators.

func KeysStringMap

func KeysStringMap(m map[string]string) []string

KeysStringMap returns keys from given map.

func PickInt

func PickInt(values ...int) int

PickInt returns first non-zero integer passed.

func PickString

func PickString(values ...string) string

PickString returns first non-empty string passed.

func PickStringMap

func PickStringMap(values ...map[string]string) map[string]string

PickStringMap returns first non-empty map of strings.

func PickStringSlice

func PickStringSlice(values ...[]string) []string

PickStringSlice returns first non-empty strings slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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