goutils

package module
v0.0.0-...-65f1006 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2018 License: MIT Imports: 8 Imported by: 8

README

goutils

Utility functions of Golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsFileExist

func IsFileExist(filepath string) (bool, error)

func ParseUint

func ParseUint(str string, bitSize int) (uint64, error)

ParseUint like strconv.ParseUnit, but it recognize binary string like "0b0101" and parse it. 10 and 16 base is OK.

func PrefixStringPerLine

func PrefixStringPerLine(w io.Writer, lines, prefixStr string)

func PrintStringMismatch

func PrintStringMismatch(result, original []byte, debug bool)

func ReadLine

func ReadLine(r *bufio.Reader) (string, error)

@r can be get from *os.File by bufio.NewReader()

func SaveToFile

func SaveToFile(data []byte, filename string) error

func Trace

func Trace(w io.Writer)

Types

This section is empty.

Jump to

Keyboard shortcuts

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