util

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package util provides some utility tools for other components. Such as net-transporting, file-operating, rate-limiter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNatural

func IsNatural(value string) bool

IsNatural returns whether the value>=0.

func IsNil

func IsNil(value interface{}) bool

IsNil returns whether the value is nil.

func IsNumeric

func IsNumeric(value string) bool

IsNumeric returns whether the value is a numeric. If the bitSize of value below 0 or above 64 an error is returned.

func IsPositive

func IsPositive(value int64) bool

IsPositive returns whether the value is a positive number.

func IsTrue

func IsTrue(value bool) bool

IsTrue returns whether the value is true.

func JSONString

func JSONString(v interface{}) string

JSONString returns json string of the v.

func Max

func Max(x, y int64) int64

Max returns the larger of x or y.

func Min

func Min(x, y int64) int64

Min returns the smaller of x or y.

Types

This section is empty.

Jump to

Keyboard shortcuts

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