util

package
v0.16.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProcessToken = NewToken()

Functions

func AbsInt64

func AbsInt64(i int64) int64

AbsInt64 is an ABS function for int64 type

func ClearToLog

func ClearToLog(topic string, key string) bool

func MaxInt

func MaxInt(i1, i2 int) int

func MaxInt64

func MaxInt64(i1, i2 int64) int64

func MaxUInt64

func MaxUInt64(i1, i2 uint64) uint64

func MinInt

func MinInt(i1, i2 int) int

func MinInt64

func MinInt64(i1, i2 int64) int64

func MinString

func MinString(i1, i2 string) string

func PrettyUniqueToken

func PrettyUniqueToken() string

func RandomHash

func RandomHash() string

func TernaryInt

func TernaryInt(condition bool, resTrue int, resFalse int) int

TernaryInt acts like a "? :" C-style ternary operator for ints

func TernaryString

func TernaryString(condition bool, resTrue string, resFalse string) string

TernaryString acts like a "? :" C-style ternary operator for strings

Types

type Token

type Token struct {
	Hash string
}

Token is used to identify and validate requests to this service

func NewToken

func NewToken() *Token

func (*Token) Short

func (token *Token) Short() string

Jump to

Keyboard shortcuts

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