mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 04:48:29 +08:00
16 lines
192 B
Go
16 lines
192 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
|