str

package
v0.0.0-...-bb1a4e7 Latest Latest
Warning

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

Go to latest
Published: May 9, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJsonBytes

func GetJsonBytes(o interface{})

func IntToByte

func IntToByte(v int) []byte

func ReadFileAsString

func ReadFileAsString(path string) string

func ReadFileData

func ReadFileData(path string) (string, error)

func StdMarshal

func StdMarshal(o interface{}) ([]byte, error)

func StreamToByte

func StreamToByte(stream io.Reader) []byte

func ToLowerAscii

func ToLowerAscii(src string) string

converts ascii chars of a given string in lowercase this function is at least twice as fast as standard to lower function of go standard library

func UnsafeBytes

func UnsafeBytes(s string) []byte

func UnsafeString

func UnsafeString(data []byte) string

A hack until issue golang/go#2632 is fixed. See: https://github.com/golang/go/issues/2632

Types

type ByteSize

type ByteSize float64
const (
	KB ByteSize = 1 << (10 * iota) // 1 << (10*1)
	MB                             // 1 << (10*2)
	GB                             // 1 << (10*3)
	TB                             // 1 << (10*4)
	PB                             // 1 << (10*5)
	EB                             // 1 << (10*6)
	ZB                             // 1 << (10*7)
	YB                             // 1 << (10*8)
)

Jump to

Keyboard shortcuts

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