util

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2018 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidPort

func IsValidPort(port int) bool

IsValidPort verifies if the port is valid or not.

func LogTag

func LogTag(tag string) string

Builds a tag for the log entries with indentation in order to align the log entries.

func ObtainIpPort

func ObtainIpPort(hostname string) (string, int)

Obtains IP port from a hostname string i.e. 178.673.111.33:9122.

Types

type Enum added in v0.2.0

type Enum interface {
	// contains filtered or unexported methods
}

Enum is the interface for all the custom enum types.

type RandSafe added in v0.2.0

type RandSafe struct {
	// contains filtered or unexported fields
}

RandSafe is a version of math/rand that can be used by multiple goroutines safely.

func NewRandSafe added in v0.2.0

func NewRandSafe(source rand.Source) *RandSafe

NewRandSafe creates a new RandSafe to be used.

func (*RandSafe) ExpFloat64 added in v0.2.0

func (r *RandSafe) ExpFloat64() float64

func (*RandSafe) Float32 added in v0.2.0

func (r *RandSafe) Float32() float32

func (*RandSafe) Float64 added in v0.2.0

func (r *RandSafe) Float64() float64

func (*RandSafe) Int added in v0.2.0

func (r *RandSafe) Int() int

func (*RandSafe) Int31 added in v0.2.0

func (r *RandSafe) Int31() int32

func (*RandSafe) Int31n added in v0.2.0

func (r *RandSafe) Int31n(n int32) int32

func (*RandSafe) Int63 added in v0.2.0

func (r *RandSafe) Int63() int64

func (*RandSafe) Int63n added in v0.2.0

func (r *RandSafe) Int63n(n int64) int64

func (*RandSafe) Intn added in v0.2.0

func (r *RandSafe) Intn(n int) int

func (*RandSafe) NormFloat64 added in v0.2.0

func (r *RandSafe) NormFloat64() float64

func (*RandSafe) Perm added in v0.2.0

func (r *RandSafe) Perm(n int) []int

func (*RandSafe) Read added in v0.2.0

func (r *RandSafe) Read(p []byte) (int, error)

func (*RandSafe) Seed added in v0.2.0

func (r *RandSafe) Seed(seed int64)

func (*RandSafe) Uint32 added in v0.2.0

func (r *RandSafe) Uint32() uint32

func (*RandSafe) Uint64 added in v0.2.0

func (r *RandSafe) Uint64() uint64

type SourceSafe added in v0.2.0

type SourceSafe struct {
	// contains filtered or unexported fields
}

SourceSafe is a version of math/rand source that can be used by multiple goroutines safely.

func NewSourceSafe added in v0.2.0

func NewSourceSafe(source rand.Source) *SourceSafe

NewSourceSafe creates a new SourceSafe to be used.

func (*SourceSafe) Int63 added in v0.2.0

func (source *SourceSafe) Int63() int64

func (*SourceSafe) Seed added in v0.2.0

func (source *SourceSafe) Seed(seed int64)

Jump to

Keyboard shortcuts

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