utils

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

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

Go to latest
Published: Jul 18, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CsvToMap

func CsvToMap(csv []string) (map[string]string, error)

CsvToMap TODO

func CurrentFunctionName

func CurrentFunctionName() string

CurrentFunctionName returns the scope of the function from which it is invoked

func FormatReportURL

func FormatReportURL(consumerURL string, token string) string

FormatReportURL parses and returns the correct reporting URL

func GenerateUUID4

func GenerateUUID4() string

GenerateUUID4 generates a UUID Version 4 based on RFC 4122

func GetLocalContainerID

func GetLocalContainerID(cgroupfile string) (string, error)

GetLocalContainerID returns the ID of the current local container

func GetRandomName

func GetRandomName(prefix string) string

GetRandomName returns a random name prefixed with the supplied string

func GetStringFromReader

func GetStringFromReader(reader io.ReadCloser) (string, error)

GetStringFromReader converts io.Reader to string

func GetTimestamp

func GetTimestamp() string

GetTimestamp returns the current runtime TODO - need to decide the best format for this

func KeyInMap

func KeyInMap(s string, m map[string]int) bool

KeyInMap checks if the supplied string s, is present as a key in the supplied map[string]int (which is being used as a set)

func RemoveStringFromSlice

func RemoveStringFromSlice(s []string, r string) []string

RemoveStringFromSlice removes the matching string from a slice of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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