misc

package
v0.1.3-0...-08ec195 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: BSD-4-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AspectRatio

func AspectRatio(srcRect image.Point, toResize uint64) image.Point

func FileSize

func FileSize(s uint64) string

FileSize calculates the file size and generate user-friendly string.

func FileSizeIEC

func FileSizeIEC(s uint64) string

FileSize calculates the file size and generate user-friendly string.

func FillUnicodeWidth

func FillUnicodeWidth(byteLength int, char rune) int

func FormatInt

func FormatInt(value int) string

func FormatInt16

func FormatInt16(value int16) string

func FormatInt32

func FormatInt32(value int32) string

func FormatInt64

func FormatInt64(value int64) string

func FormatInt8

func FormatInt8(value int8) string

func FormatUint

func FormatUint(value uint) string

func FormatUint16

func FormatUint16(value uint16) string

func FormatUint32

func FormatUint32(value uint32) string

func FormatUint64

func FormatUint64(value uint64) string

func FormatUint8

func FormatUint8(value uint8) string

func GuessUnicodeWidth

func GuessUnicodeWidth(char rune) (realSize int)

func HexDump

func HexDump(by []byte) string

func ParseInt

func ParseInt(value string) (ret *int)

func ParseInt16

func ParseInt16(value string) (ret *int16)

func ParseInt16Must

func ParseInt16Must(value string) int16

func ParseInt32

func ParseInt32(value string) (ret *int32)

func ParseInt32Must

func ParseInt32Must(value string) int32

func ParseInt64

func ParseInt64(value string) (ret *int64)

func ParseInt64Must

func ParseInt64Must(value string) int64

func ParseInt8

func ParseInt8(value string) (ret *int8)

func ParseInt8Must

func ParseInt8Must(value string) int8

func ParseIntMust

func ParseIntMust(value string) int

func ParseUint

func ParseUint(value string) (ret *uint)

func ParseUint16

func ParseUint16(value string) (ret *uint16)

func ParseUint16Must

func ParseUint16Must(value string) uint16

func ParseUint32

func ParseUint32(value string) (ret *uint32)

func ParseUint32Must

func ParseUint32Must(value string) uint32

func ParseUint64

func ParseUint64(value string) (ret *uint64)

func ParseUint64Must

func ParseUint64Must(value string) uint64

func ParseUint8

func ParseUint8(value string) (ret *uint8)

func ParseUint8Must

func ParseUint8Must(value string) uint8

func ParseUintMust

func ParseUintMust(value string) uint

Types

type UUID

type UUID [16]byte

func NewUUID

func NewUUID() (u UUID)

func (UUID) Compare

func (u UUID) Compare(other UUID) int

func (UUID) Equal

func (u UUID) Equal(other UUID) bool

func (UUID) Marshal

func (u UUID) Marshal() ([]byte, error)

func (UUID) MarshalJSON

func (u UUID) MarshalJSON() ([]byte, error)

func (UUID) MarshalTo

func (u UUID) MarshalTo(buf []byte) (n int, err error)

func (UUID) Random

func (u UUID) Random()

func (*UUID) Scan

func (u *UUID) Scan(src interface{}) error

Scan implements the Scanner interface.

func (*UUID) Size

func (u *UUID) Size() int

func (UUID) ToHexString

func (u UUID) ToHexString() string

func (*UUID) UUIDFromHexString

func (u *UUID) UUIDFromHexString(buf []byte) error

func (*UUID) Unmarshal

func (u *UUID) Unmarshal(buf []byte) error

func (*UUID) UnmarshalJSON

func (u *UUID) UnmarshalJSON(from []byte) error

func (UUID) Value

func (u UUID) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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