templateutil

package
v0.0.0-...-6136a5a Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package templateutil contains template functions from prometheus_bot

Index

Constants

View Source
const (
	Kb = iota
	Mb
	Gb
	Tb
	Pb
	Eb
	Zb
	Yb
	InformationSizeMAX
)

*

  • Subdivideb by 1024
View Source
const (
	K = iota
	M
	G
	T
	P
	E
	Z
	Y
	ScaleSizeMAX
)

*

  • Subdivided by 10000

Variables

This section is empty.

Functions

func HasKey

func HasKey(dict map[string]interface{}, keySearch string) bool

HasKey checks if the map contains the key

func StrFormatByte

func StrFormatByte(in string, j1 int) string

StrFormatByte scales number for It measure unit

func StrFormatDate

func StrFormatDate(toformat string, templateTimeZone string, templateTimeOutFormat string) string

StrFormatDate formats as date

func StrFormatFloat

func StrFormatFloat(f string) string

StrFormatFloat formats as float

func StrFormatInt

func StrFormatInt(i string) string

StrFormatInt formats as integer

func StrFormatMeasureUnit

func StrFormatMeasureUnit(MeasureUnit string, value string, templateSplitToken string) string

StrFormatMeasureUnit formats the template

func StrFormatScale

func StrFormatScale(in string, j1 int) string

StrFormatScale formats number for fisics measure unit

Types

This section is empty.

Jump to

Keyboard shortcuts

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