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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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