base

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExitCodeSuccess           = 0
	ExitCodeGeneralError      = 1
	ExitCodePanic             = 2
	ExitCodeInvalidArgs       = 3
	ExitCodeNormalUpdate      = 10
	ExitCodeDataInconsistency = 11
	ExitCodeConfigError       = 12
)

Variables

This section is empty.

Functions

func ChdirWalk added in v0.3.0

func ChdirWalk(path string, walkFn WalkFunc) error

Walk the given path, but chdir first.

func GetSha256

func GetSha256(filename string) (string, error)

GetSha256 computes and returns the SHA256 for the given file.

func Walk

func Walk(path string, walkFn WalkFunc) error

Walk the given path, mostly a simple wrapper around filepath.Walk.

Types

type Context

type Context struct {
	Command    string
	ConfigPath string

	config.TooBig

	Verbose          bool
	UpdateIsError    bool
	FilePathOverride string
}

Context is the basic structure that toobig uses to keep state. Many methods will take this structure as their first argument.

type WalkFunc

type WalkFunc func(path string, info fs.DirEntry) error

Jump to

Keyboard shortcuts

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