misc

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: GPL-3.0 Imports: 6 Imported by: 18

Documentation

Index

Constants

View Source
const (
	MinByte = MinUint8
	MinRune = MinInt32

	MaxInt8  = 0x7F
	MaxInt16 = 0x7FFF
	MaxInt32 = 0x7FFFFFFF
	MaxInt64 = 0x7FFFFFFFFFFFFFFF

	MaxUint8  = uint8(0xFF)
	MaxUint16 = uint16(0xFFFF)
	MaxUint32 = uint32(0xFFFFFFFF)
	MaxUint64 = uint64(0xFFFFFFFFFFFFFFFF)

	MinInt8  = -MaxInt8 - 1
	MinInt16 = -MaxInt16 - 1
	MinInt32 = -MaxInt32 - 1
	MinInt64 = -MaxInt64 - 1

	MinUint8  = uint8(0)
	MinUint16 = uint16(0)
	MinUint32 = uint32(0)
	MinUint64 = uint64(0)

	MaxByte = MaxUint8
	MaxRune = MaxInt32
)

Variables

This section is empty.

Functions

func Abs

func Abs(a int) int

func Abs32

func Abs32(a int32) int32

func Abs64

func Abs64(a int64) int64

func AbsF32

func AbsF32(a float32) float32

func AbsF64

func AbsF64(a float64) float64

func Assert

func Assert(cond bool, flag ...interface{})

func GetLog added in v1.0.4

func GetLog() *log.Logger

func GetStdLog added in v1.0.4

func GetStdLog() *log.Logger

func Halt

func Halt(flag ...interface{})

func InstantClose

func InstantClose(f *os.File) error

func InstantCreate

func InstantCreate(name string) (*os.File, error)

func Max

func Max(a, b int) int

func Max32

func Max32(a, b int32) int32

func Max64

func Max64(a, b int64) int64

func MaxF32

func MaxF32(a, b float32) float32

func MaxF64

func MaxF64(a, b float64) float64

func MaxU

func MaxU(a, b uint) uint

func MaxUP

func MaxUP(a, b uintptr) uintptr

func Min

func Min(a, b int) int

func Min32

func Min32(a, b int32) int32

func Min64

func Min64(a, b int64) int64

func MinF32

func MinF32(a, b float32) float32

func MinF64

func MinF64(a, b float64) float64

func MinU

func MinU(a, b uint) uint

func MinUP

func MinUP(a, b uintptr) uintptr

func Odd

func Odd(n int) bool

func SetLog

func SetLog(log *log.Logger)

func Version

func Version() string

func Want

func Want(cond bool, t *testing.T)

Types

type Nerror added in v1.0.2

type Nerror interface {
	error
	ErrorNum() int
}

func NewError added in v1.0.2

func NewError(text string, number int) Nerror

Jump to

Keyboard shortcuts

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