typeconv

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

Code generated by ./intsize.sh DO NOT EDIT

Index

Constants

View Source
const IntSize = 32 << (^uint(0) >> 32 & 1) // 32 or 64

Variables

This section is empty.

Functions

func AsInt

func AsInt(v interface{}) (int, bool)

func AsInt8

func AsInt8(v interface{}) (int8, bool)

AsInt8 tries to convert to int8

func AsInt8Slice

func AsInt8Slice(v interface{}) ([]int8, bool)

AsInt8Slice tries to convert to slice of int8

func AsInt16

func AsInt16(v interface{}) (int16, bool)

AsInt16 tries to convert to int16

func AsInt16Slice

func AsInt16Slice(v interface{}) ([]int16, bool)

AsInt16Slice tries to convert to slice of int16

func AsInt32

func AsInt32(v interface{}) (int32, bool)

AsInt32 tries to convert to int32

func AsInt32Slice

func AsInt32Slice(v interface{}) ([]int32, bool)

AsInt32Slice tries to convert to slice of int32

func AsInt64

func AsInt64(v interface{}) (int64, bool)

AsInt64 tries to convert to int64

func AsInt64Slice

func AsInt64Slice(v interface{}) ([]int64, bool)

AsInt64Slice tries to convert to slice of int64

func AsIntN

func AsIntN(v interface{}, bitsize int) (int64, bool)

AsIntN tries to convert a int64 to int of given size

func AsSlice

func AsSlice(v interface{}) ([]interface{}, bool)

func AsString

func AsString(v interface{}) (string, bool)

func AsUint

func AsUint(v interface{}) (uint, bool)

func AsUint8

func AsUint8(v interface{}) (uint8, bool)

AsUint8 tries to convert to uint8

func AsUint8Slice

func AsUint8Slice(v interface{}) ([]uint8, bool)

AsUint8Slice tries to convert to slice of uint8

func AsUint16

func AsUint16(v interface{}) (uint16, bool)

AsUint16 tries to convert to uint16

func AsUint16Slice

func AsUint16Slice(v interface{}) ([]uint16, bool)

AsUint16Slice tries to convert to slice of uint16

func AsUint32

func AsUint32(v interface{}) (uint32, bool)

AsUint32 tries to convert to uint32

func AsUint32Slice

func AsUint32Slice(v interface{}) ([]uint32, bool)

AsUint32Slice tries to convert to slice of uint32

func AsUint64

func AsUint64(v interface{}) (uint64, bool)

AsUint64 tries to convert to uint64

func AsUint64Slice

func AsUint64Slice(v interface{}) ([]uint64, bool)

AsUint64Slice tries to convert to slice of uint64

func AsUintN

func AsUintN(v interface{}, bitsize int) (uint64, bool)

AsUintN tries to convert a uint64 to uint of given size

Types

This section is empty.

Jump to

Keyboard shortcuts

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