semantic-exit 1.0.0

Semantic exit codes inspired by HTTP status codes
Documentation
package exit

import (
	"syscall"
	"testing"
)

func TestFromSignal(t *testing.T) {
	scenarios := []struct {
		signal   syscall.Signal
		expected Code
	}{
		{syscall.SIGINT, Code(130)},
	}

	for _, s := range scenarios {
		if got := FromSignal(s.signal); got != s.expected {
			t.Errorf("Expected FromSignal(%d) to be %d; got %d", s.signal, s.expected, got)
		}
	}
}