Skip to content

grrtrr/exit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

exit

import "github.com/grrtrr/exit"

Package exit provides a few utility functions to exit a program with a message.

exit.go

func Die(a ...interface{})

Die prints a message @a to stderr and exits with 1 - fmt.Println variant.

func Dief(format string, a ...interface{})

Dief is like Die(), but with a format string - fmt.Printf variant.

func Error(a ...interface{})

Error calls Die with an ERROR message - fmt.Println variant.

func Errorf(format string, a ...interface{})

Errorf cals Dief with an ERROR message - fmt.Printf variant.

func Fatal(a ...interface{})

Fatal calls Die with a FATAL message - fmt.Println variant.

func Fatalf(format string, a ...interface{})

Fatalf calls Dief with a FATAL message - fmt.Printf / log.Fatalf variant.

func PDie(a ...interface{})

PDie is like Die(), but preprends the name of the program.

func PDief(format string, a ...interface{})

PDief is like Dief(), but preprend the name of the program.


Generated by godoc2md

About

Utility to mimic Perl's ever-living "die".

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages