Perl's "die" for Go
Go
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.travis.yml
LICENSE.txt
README.md
die.go
die_test.go

README.md

Perl's "die" for Go

Emulate Perl's die function for Go.

Example:

package main

import (
	"os"

	. "github.com/tebeka/die"
)

func main() {
	filename := "/path/to/file"
	file, err := os.Open(filename)
	if err != nil {
		Die("can't open %s - %s", filename, err)
	}
}

Project Info

See https://github.com/tebeka/die