27 lines
		
	
	
		
			719 B
		
	
	
	
		
			Markdown
		
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			719 B
		
	
	
	
		
			Markdown
		
	
	
# go-erorr
 | 
						|
 | 
						|
Package **erorr** implements tools to create and manipulate errors, for the Go programming language.
 | 
						|
 | 
						|
(This package used to be called "fck".)
 | 
						|
 | 
						|
## Documention
 | 
						|
 | 
						|
Online documentation, which includes examples, can be found at: http://godoc.org/sourcecode.social/reiver/go-erorr
 | 
						|
 | 
						|
[](https://godoc.org/sourcecode.social/reiver/go-erorr)
 | 
						|
 | 
						|
## Creating Errors
 | 
						|
 | 
						|
There are two ways to create errors —
 | 
						|
 | 
						|
With `erorr.Error`:
 | 
						|
```
 | 
						|
	const err error = erorr.Error("internal-error")
 | 
						|
```
 | 
						|
And with `erorr.Errorf`:
 | 
						|
```
 | 
						|
	var err error = erorr.Errorf("bad value for id %q", id)
 | 
						|
```
 | 
						|
 | 
						|
**One thing to notice is that `erorr.Error` errors can be a Go `const`.**
 |