Documentation ¶
Overview ¶
Package logs handles errors and user feedback.
Index ¶
- Constants
- Variables
- func Arg(arg string, exit bool, args ...string) error
- func Danger(err error)
- func Fatal(err error)
- func Filepath(filename string) string
- func Log(err error)
- func Panic(b bool)
- func Path(name string) string
- func Print(a ...any)
- func Printcr(a ...any)
- func Printcrf(format string, a ...any)
- func Printf(format string, a ...any)
- func Println(a ...any)
- func Save(filename string, err error) (ok bool)
Examples ¶
Constants ¶
View Source
const ( GapUser string = "df2" // GapUser is the configuration and logs subdirectory name. Filename string = "errors.log" // Filename is the default error log filename. )
Variables ¶
View Source
var ErrNoCmd = errors.New("no command argument was provided")
Functions ¶
func Danger ¶
func Danger(err error)
Danger logs the error to stdout, but continues the program.
Example ¶
color.Enable = false logs.Panic(false) logs.Danger(ErrATest)
Output:
func Print ¶
func Print(a ...any)
Print formats using the default formats for its operands and writes to standard output.
func Printcr ¶
func Printcr(a ...any)
Printcr otherwise erases the current line and writes to standard output.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.