grrtrr / exit

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

exit

import "github.com/grrtrr/exit"

Overview

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

Index

Package files

exit.go

func Die

func Die(a ...interface{})

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

func Dief

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

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

func Error

func Error(a ...interface{})

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

func Errorf

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

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

func Fatal

func Fatal(a ...interface{})

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

func Fatalf

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

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

func PDie

func PDie(a ...interface{})

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

func PDief

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".


Languages

Language:Go 100.0%