util

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TimeDateFormat used for ancientt outputs
	TimeDateFormat = "2006-01-02T15:04:05-0700"
)

Variables

This section is empty.

Functions

func BoolFalsePointer

func BoolFalsePointer() *bool

BoolFalsePointer return bool true as a pointer

func BoolTruePointer

func BoolTruePointer() *bool

BoolTruePointer return bool true as a pointer

func CastNumberToFloat64 added in v0.2.5

func CastNumberToFloat64(in interface{}) (float64, error)

CastNumberToFloat64 cast a number from interface{} to float64

func CastToString

func CastToString(val interface{}) string

CastToString cast interface{} to string

func FloatPointer added in v0.2.5

func FloatPointer(in float64) *float64

FloatPointer return a pointer to a given float

func GetPNameFromTask

func GetPNameFromTask(round int, hostname string, command string, role PNameRole, testStartTime time.Time) string

GetPNameFromTask get a "persistent" name for a task This is done by calculating the checksums of the used names.

func GetTaskName

func GetTaskName(tester string, testStartTime time.Time) string

GetTaskName get a task name

func Int64Pointer added in v0.2.6

func Int64Pointer(in int64) *int64

Int64Pointer return a pointer to a given int64

func IntToChar

func IntToChar(i int) string

IntToChar This function is converting integer to a rune character

func UniqueStringSlice added in v0.2.2

func UniqueStringSlice(ins ...[]string) []string

UniqueStringSlice return deduplicated string slice from one or more ins.

func WriteNewTruncFile

func WriteNewTruncFile(filename string, buffer []byte) error

WriteNewTruncFile write new or truncate existing file

Types

type PNameRole

type PNameRole string

PNameRole task role names type

const (
	// PNameRoleClient Client role name
	PNameRoleClient PNameRole = "client"
	// PNameRoleServer Server role name
	PNameRoleServer PNameRole = "server"
)

Jump to

Keyboard shortcuts

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