bigutil

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2023 License: MIT Imports: 4 Imported by: 0

README

gommon/bigutil

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNilSource             = errors.New("src must not be nil")
	ErrNonBytesSource        = errors.New("the type of src must be []byte")
	ErrEmptyBytesSource      = errors.New("the length of src in bytes must be greater than 0")
	ErrOverlengthBytesSource = errors.Errorf("the length of src in bytes must be %d or less", maxByteLength)

	ErrNegativeValue   = errors.New("the value must be 0 or more")
	ErrOverlengthValue = errors.Errorf("the length of the value in bits must be %d or less", maxBitLength)
)

Functions

This section is empty.

Types

type Int

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

func NewInt

func NewInt(x *big.Int) Int

func (Int) Base

func (x Int) Base() int

func (Int) BigInt

func (x Int) BigInt() *big.Int

func (Int) Bytes

func (x Int) Bytes() []byte

func (Int) MarshalText

func (x Int) MarshalText() ([]byte, error)

func (*Int) Scan

func (x *Int) Scan(src any) error

func (*Int) SetBaseTo10

func (x *Int) SetBaseTo10()

func (*Int) SetBaseTo16

func (x *Int) SetBaseTo16()

func (Int) String

func (x Int) String() string

func (*Int) UnmarshalText

func (x *Int) UnmarshalText(text []byte) error

func (Int) Value

func (x Int) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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