Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 985 Bytes

File metadata and controls

48 lines (35 loc) · 985 Bytes

ERRNO

C-like err codes providable module

Test & Build Go Reference Go Report Card

About

C-like err codes providable module

Installation

go get github.com/rejchev/errno

Usage example

import (
	"context"

	errnov1 "github.com/rejchev/errno"
)

func main() {

	buff := []byte{} 
	if code := read(&buff); FAIL(code) {
		panic(code.String())
	}

}

func read(buff *[]byte) errnov1.Code {
	if buff == nil {
		return errnov1.EINVAL
	}

	// do something ...

	return errnov1.OK
}