bytesizes

package
Version: v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package bytesizes provides constants with the size in bytes of numeric types.

Index

Constants

View Source
const (
	Int        = uint64(unsafe.Sizeof(int(0)))
	Uint       = uint64(unsafe.Sizeof(uint(0)))
	Uintptr    = uint64(unsafe.Sizeof(uintptr(0)))
	Bool       = uint64(unsafe.Sizeof(bool(false)))
	Int8       = uint64(unsafe.Sizeof(int8(0)))
	Int16      = uint64(unsafe.Sizeof(int16(0)))
	Int32      = uint64(unsafe.Sizeof(int32(0)))
	Int64      = uint64(unsafe.Sizeof(int64(0)))
	Uint8      = uint64(unsafe.Sizeof(uint8(0)))
	Uint16     = uint64(unsafe.Sizeof(uint16(0)))
	Uint32     = uint64(unsafe.Sizeof(uint32(0)))
	Uint64     = uint64(unsafe.Sizeof(uint64(0)))
	Float32    = uint64(unsafe.Sizeof(float32(0)))
	Float64    = uint64(unsafe.Sizeof(float64(0)))
	Complex64  = uint64(unsafe.Sizeof(complex64(0)))
	Complex128 = uint64(unsafe.Sizeof(complex128(0)))
	Byte       = Uint8
	Rune       = Int32
)

Constants for the byte size of each Go numeric type.

Variables

Kind maps each numeric reflect.Kind to the number of bytes it takes. Non-numeric kinds and aliases are not included.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto