util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExist

func FileExist(path string) bool

file exist

func FnvHash

func FnvHash(data []byte) uint32

func GetFileInfo

func GetFileInfo(path string) ([]byte, error)

get file info

func MD5Hash

func MD5Hash(data []byte) string

func ReadBytesFromFile

func ReadBytesFromFile(file string) ([]byte, error)

read bytes from file

func ReadNoStringFromFile

func ReadNoStringFromFile(file string) (string, error)

read non empty string from file

func ReadStringFromFile

func ReadStringFromFile(file string) (string, error)

read string from file

func SHA1Hash

func SHA1Hash(data []byte) string

func WriteConfig

func WriteConfig(path string, data []byte) error

write back to file

Types

type FileInfo

type FileInfo struct {
	Name    string
	Size    int64
	Mode    os.FileMode
	ModTime time.Time
	IsDir   bool
}

Jump to

Keyboard shortcuts

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