util

package
v0.0.0-...-165f8d8 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFileNotExist  = errors.New("file: not exist")
	ErrFileNoContent = errors.New("file: no content")
)
View Source
var (
	// used to stop tar file walker
	ErrStop       = errors.New("stop")
	ErrNotTarFile = errors.New("archiver: not tar file")
)

Functions

func GetTarFileRootDir

func GetTarFileRootDir(filename string) (string, error)

func IsNoContent

func IsNoContent(err error) bool

func IsNotExist

func IsNotExist(err error) bool

func LoadVersion

func LoadVersion(versionPath string) (string, error)

LoadVersion loads version info from file. Note only one version is allowed to be set in the file, and the first non-empty line is considered as version.

func PrintErrorAndExit

func PrintErrorAndExit(err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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