Documentation ¶
Overview ¶
Package logs handles errors and user feedback.
Index ¶
- Constants
- Variables
- func Arg(arg string, args ...string) error
- func Danger(err error)
- func Fatal(err error)
- func Filepath(filename string) string
- func Log(err error)
- func Path(name string) string
- func Print(a ...interface{})
- func Printcr(a ...interface{})
- func Printcrf(format string, a ...interface{})
- func Printf(format string, a ...interface{})
- func Println(a ...interface{})
- func Simulate()
Constants ¶
View Source
const ( // GapUser is the configuration and logs subdirectory name. GapUser string = "df2" // Filename is the default error log filename. Filename string = "errors.log" )
Variables ¶
View Source
var ( // Panic uses the panic function to handle all error logs. Panic = false // nolint:gochecknoglobals // Quiet stops most writing to the standard output. Quiet = false // nolint:gochecknoglobals )
View Source
var ErrNoArg = errors.New("no arguments are provided")
ErrNoArg no args.
Functions ¶
func Fatal ¶
func Fatal(err error)
Fatal logs any errors and exits to the operating system with error code 1.
func Print ¶
func Print(a ...interface{})
Print obeys the --quiet flag or formats using the default formats for its operands and writes to standard output.
func Printcr ¶
func Printcr(a ...interface{})
Printcr obeys the --quiet flag or otherwise erases the current line and writes to standard output.
func Printcrf ¶
func Printcrf(format string, a ...interface{})
Printcrf obeys the --quiet flag or otherwise erases the current line and formats according to a format specifier.
func Printf ¶
func Printf(format string, a ...interface{})
Printf obeys the --quiet flag or formats according to a format specifier and writes to standard output.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.