util

package
v0.0.0-...-fbe82ab Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateDirIfMissing

func CreateDirIfMissing(dirPath string) (bool, error)

func DecodeOrderPreservingVarUint64

func DecodeOrderPreservingVarUint64(bytes []byte) (uint64, int)

func DirEmpty

func DirEmpty(dirPath string) (bool, error)

如果dirpath处的dir为空,则dir empty返回true

func EncodeOrderPreservingVarUint64

func EncodeOrderPreservingVarUint64(number uint64) []byte

EncodeOrderPreservingVaruint64返回uint64数字的字节表示,以便

func FileExists

func FileExists(filePath string) (bool, int64, error)

func ListSubdirs

func ListSubdirs(dirPath string) ([]string, error)

ListSubdirs返回子目录

Types

type Buffer

type Buffer struct {
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(b []byte) *Buffer

func (*Buffer) DecodeRawBytes

func (b *Buffer) DecodeRawBytes(alloc bool) ([]byte, error)

func (*Buffer) DecodeVarint

func (b *Buffer) DecodeVarint() (uint64, error)

func (*Buffer) GetBytesConsumed

func (b *Buffer) GetBytesConsumed() int

GetBytesConsumed返回基础[]字节中当前位置的偏移量

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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