byteconv

package
v0.0.0-...-202847b Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2023 License: Apache-2.0 Imports: 3 Imported by: 8 modules, 21 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package byteconv converts sql.RawBytes for MySQL or MariaDB to primitive types.

It supports the null types.

Index

Constants

This section is empty.

Variables

View Source
var UseStdLib = false

UseStdLib set to true to use the standard library strconv functions. They are much slower and only ParseFloat has more precision.

Functions

func LenInt

func LenInt(i int64) int

func ParseBool

func ParseBool(b []byte) (v bool, ok bool, err error)

ParseBool same as strconv.ParseBool but faster and no allocations. Use err == nil to check if a bool value is valid.

func ParseFloat

func ParseFloat(b []byte) (v float64, ok bool, err error)

Float parses a byte-slice and returns the float it represents. If an invalid character is encountered, it will stop there.

func ParseInt

func ParseInt(b []byte) (v int64, ok bool, err error)

ParseInt parses a byte-slice and returns the integer it represents. If an invalid character is encountered, it returns a syntax error.

func ParseUint

func ParseUint(s []byte, base int, bitSize int) (n uint64, ok bool, err error)

ParseUint is like strconv.ParseUint, but using a []byte.

Types

This section is empty.

Jump to

Keyboard shortcuts

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