utils

package
v0.0.0-...-7eed66f Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildURL

func BuildURL(hostname string, insecure bool) string

BuildURL appends http:// or https:// to given hostname, according to the insecure parameter

func FilterValues

func FilterValues(m map[string]string, s string) map[string]string

FilterValues removes all element from m where value is s

func FlatMap

func FlatMap(m map[string]string) string

FlatMap returns a string representation of a map

func Keys

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

Keys returns all the keys of the given map

func ListContains

func ListContains(list []string, search string) bool

ListContains checks a list of string contains a given string

func MapMatchesAll

func MapMatchesAll(all, search map[string]string) bool

MapMatchesAll checks first map contains all the second map elements with the same value

func ParseDuration

func ParseDuration(since time.Duration) string

ParseDuration returns a string representation of a duration

func Sha256

func Sha256(passwd string) string

Sha256 returns the string reprensation of the given password encoded using sha256

Types

This section is empty.

Jump to

Keyboard shortcuts

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