util

package
v0.0.0-...-014959c Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) bool

DirExists checks if a path exists and is a directory.

func FileExists

func FileExists(path string) bool

FileExists checks if a path exists and is a regular file.

func PrintErrAndExit

func PrintErrAndExit(err error)

PrintErrAndExit prints an error message to stderr and exits with a status code.

Types

type ExitError

type ExitError struct {
	Code    int
	Message string
}

ExitError is a custom error type which stores a message and status code.

func (ExitError) Error

func (err ExitError) Error() string

Jump to

Keyboard shortcuts

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