helper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2015 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CastStringTimeFromSToMs

func CastStringTimeFromSToMs(time string) string

CastStringTimeFromSToMs adds three zeros to the timestring to cast from Seconds to Milliseconds.

func CopyMap

func CopyMap(old map[string]string) map[string]string

CopyMap creates a real copy of a string to string map.

func PrintMapAsString

func PrintMapAsString(toPrint map[string]string, fieldSeparator, assignmentSeparator string) string

PrintMapAsString prints a map in the influxdb tags format.

func SanitizeInfluxInput

func SanitizeInfluxInput(input string) string

SanitizeInfluxInput adds backslashes to special chars.

func StringIntToStringFloat

func StringIntToStringFloat(inputInt string) string

StringIntToStringFloat adds a '.0' to a string if it does not contain a dot.

func StringToMap

func StringToMap(input, entrySplitter, keyValueSplitter string) map[string]string

StringToMap splits a string by two splitter an returns a map.

func SumIntSliceTillPos

func SumIntSliceTillPos(slice []int, pos int) int

SumIntSliceTillPos summarise an int slice till a given position.

func WaitForPort

func WaitForPort(typ, address string, timeout time.Duration) error

WaitForPort tries to connect to a server of returns with an error if no connection was made within the time

Types

This section is empty.

Jump to

Keyboard shortcuts

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