Files
the-way-to-go_ZH_CN/eBook/examples/chapter_13/errors.go
2015-03-03 12:25:25 -05:00

14 lines
203 B
Go

// errors.go
package main
import (
"errors"
"fmt"
)
var errNotFound error = errors.New("Not found error")
func main() {
fmt.Printf("error: %v", errNotFound)
}
// error: Not found error