Run Format

Package errors

import "errors"
Overview
Index
Examples

Overview ▾

Package errors implements functions to manipulate errors.

Example

1989-03-15 22:30:00 +0000 UTC: the file system has gone away

Index ▾

Package files

errors.go

func New

func New(text string) error

New returns an error that formats as the given text.

Example

emit macho dwarf: elf header corrupted

Example (Errorf)

The fmt package's Errorf function lets us use the package's formatting features to create descriptive error messages.

user "bimmler" (id 17) not found