utils

package
v2.6.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IPV4 string = "tcp4"
	IPV6 string = "tcp6"
)

Variables

This section is empty.

Functions

func AsBytes added in v2.2.1

func AsBytes(s string) []byte

AsBytes returns a slice that refers to the data backing the string s.

func AsString added in v2.2.1

func AsString(b []byte) string

AsString returns a string that refers to the data backing the slice s.

func Bool added in v2.4.0

func Bool(v bool) *bool

Bool returns a pointer value for the bool value passed in.

func BoolMap added in v2.4.0

func BoolMap(vs map[string]bool) map[string]*bool

BoolMap returns a map of bool pointers from the values passed in.

func BoolSlice added in v2.4.0

func BoolSlice(vs []bool) []*bool

BoolSlice returns a slice of bool pointers from the values passed in.

func Byte added in v2.4.0

func Byte(v byte) *byte

Byte returns a pointer value for the byte value passed in.

func ByteMap added in v2.4.0

func ByteMap(vs map[string]byte) map[string]*byte

ByteMap returns a map of byte pointers from the values passed in.

func ByteSlice added in v2.4.0

func ByteSlice(vs []byte) []*byte

ByteSlice returns a slice of byte pointers from the values passed in.

func CreateListener

func CreateListener(address string) (net.Listener, error)

CreateListener

CreateListener crates socket listener based on DSN definition.

func ExecuteFromUser

func ExecuteFromUser(cmd *exec.Cmd, u string) error

ExecuteFromUser may work only if run RR under root user

func Float32 added in v2.4.0

func Float32(v float32) *float32

Float32 returns a pointer value for the float32 value passed in.

func Float32Map added in v2.4.0

func Float32Map(vs map[string]float32) map[string]*float32

Float32Map returns a map of float32 pointers from the values passed in.

func Float32Slice added in v2.4.0

func Float32Slice(vs []float32) []*float32

Float32Slice returns a slice of float32 pointers from the values passed in.

func Float64 added in v2.4.0

func Float64(v float64) *float64

Float64 returns a pointer value for the float64 value passed in.

func Float64Map added in v2.4.0

func Float64Map(vs map[string]float64) map[string]*float64

Float64Map returns a map of float64 pointers from the values passed in.

func Float64Slice added in v2.4.0

func Float64Slice(vs []float64) []*float64

Float64Slice returns a slice of float64 pointers from the values passed in.

func Int added in v2.4.0

func Int(v int) *int

Int returns a pointer value for the int value passed in.

func Int16 added in v2.4.0

func Int16(v int16) *int16

Int16 returns a pointer value for the int16 value passed in.

func Int16Map added in v2.4.0

func Int16Map(vs map[string]int16) map[string]*int16

Int16Map returns a map of int16 pointers from the values passed in.

func Int16Slice added in v2.4.0

func Int16Slice(vs []int16) []*int16

Int16Slice returns a slice of int16 pointers from the values passed in.

func Int32 added in v2.4.0

func Int32(v int32) *int32

Int32 returns a pointer value for the int32 value passed in.

func Int32Map added in v2.4.0

func Int32Map(vs map[string]int32) map[string]*int32

Int32Map returns a map of int32 pointers from the values passed in.

func Int32Slice added in v2.4.0

func Int32Slice(vs []int32) []*int32

Int32Slice returns a slice of int32 pointers from the values passed in.

func Int64 added in v2.4.0

func Int64(v int64) *int64

Int64 returns a pointer value for the int64 value passed in.

func Int64Map added in v2.4.0

func Int64Map(vs map[string]int64) map[string]*int64

Int64Map returns a map of int64 pointers from the values passed in.

func Int64Slice added in v2.4.0

func Int64Slice(vs []int64) []*int64

Int64Slice returns a slice of int64 pointers from the values passed in.

func Int8 added in v2.4.0

func Int8(v int8) *int8

Int8 returns a pointer value for the int8 value passed in.

func Int8Map added in v2.4.0

func Int8Map(vs map[string]int8) map[string]*int8

Int8Map returns a map of int8 pointers from the values passed in.

func Int8Slice added in v2.4.0

func Int8Slice(vs []int8) []*int8

Int8Slice returns a slice of int8 pointers from the values passed in.

func IntMap added in v2.4.0

func IntMap(vs map[string]int) map[string]*int

IntMap returns a map of int pointers from the values passed in.

func IntSlice added in v2.4.0

func IntSlice(vs []int) []*int

IntSlice returns a slice of int pointers from the values passed in.

func IsolateProcess

func IsolateProcess(cmd *exec.Cmd)

IsolateProcess change gpid for the process to avoid bypassing signals to php processes.

func String added in v2.4.0

func String(v string) *string

String returns a pointer value for the string value passed in.

func StringMap added in v2.4.0

func StringMap(vs map[string]string) map[string]*string

StringMap returns a map of string pointers from the values passed in.

func StringSlice added in v2.4.0

func StringSlice(vs []string) []*string

StringSlice returns a slice of string pointers from the values passed in.

func Time added in v2.4.0

func Time(v time.Time) *time.Time

Time returns a pointer value for the time.Time value passed in.

func TimeMap added in v2.4.0

func TimeMap(vs map[string]time.Time) map[string]*time.Time

TimeMap returns a map of time.Time pointers from the values passed in.

func TimeSlice added in v2.4.0

func TimeSlice(vs []time.Time) []*time.Time

TimeSlice returns a slice of time.Time pointers from the values passed in.

func Uint added in v2.4.0

func Uint(v uint) *uint

Uint returns a pointer value for the uint value passed in.

func Uint16 added in v2.4.0

func Uint16(v uint16) *uint16

Uint16 returns a pointer value for the uint16 value passed in.

func Uint16Map added in v2.4.0

func Uint16Map(vs map[string]uint16) map[string]*uint16

Uint16Map returns a map of uint16 pointers from the values passed in.

func Uint16Slice added in v2.4.0

func Uint16Slice(vs []uint16) []*uint16

Uint16Slice returns a slice of uint16 pointers from the values passed in.

func Uint32 added in v2.4.0

func Uint32(v uint32) *uint32

Uint32 returns a pointer value for the uint32 value passed in.

func Uint32Map added in v2.4.0

func Uint32Map(vs map[string]uint32) map[string]*uint32

Uint32Map returns a map of uint32 pointers from the values passed in.

func Uint32Slice added in v2.4.0

func Uint32Slice(vs []uint32) []*uint32

Uint32Slice returns a slice of uint32 pointers from the values passed in.

func Uint64 added in v2.4.0

func Uint64(v uint64) *uint64

Uint64 returns a pointer value for the uint64 value passed in.

func Uint64Map added in v2.4.0

func Uint64Map(vs map[string]uint64) map[string]*uint64

Uint64Map returns a map of uint64 pointers from the values passed in.

func Uint64Slice added in v2.4.0

func Uint64Slice(vs []uint64) []*uint64

Uint64Slice returns a slice of uint64 pointers from the values passed in.

func Uint8 added in v2.4.0

func Uint8(v uint8) *uint8

Uint8 returns a pointer value for the uint8 value passed in.

func Uint8Map added in v2.4.0

func Uint8Map(vs map[string]uint8) map[string]*uint8

Uint8Map returns a map of uint8 pointers from the values passed in.

func Uint8Slice added in v2.4.0

func Uint8Slice(vs []uint8) []*uint8

Uint8Slice returns a slice of uint8 pointers from the values passed in.

func UintMap added in v2.4.0

func UintMap(vs map[string]uint) map[string]*uint

UintMap returns a map of uint pointers from the values passed in.

func UintSlice added in v2.4.0

func UintSlice(vs []uint) []*uint

UintSlice returns a slice of uint pointers from the values passed in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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