number

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNumber

func ParseNumber[T Number](str string, zero any) (T, error)

Types

type Checker

type Checker int64

Checker 用于测试的时候,进行计数检查

func (*Checker) Inc

func (tn *Checker) Inc()

Inc 计数+1

func (*Checker) Want

func (tn *Checker) Want(want int) error

Want 对比测试,失败则返回 error

type Float

type Float interface {
	~float32 | ~float64
}

type Number

type Number interface {
	Signed | Unsigned | Float
}

type Signed

type Signed interface {
	~int | ~int8 | ~int16 | ~int32 | ~int64
}

type Unsigned

type Unsigned interface {
	~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

Jump to

Keyboard shortcuts

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