看下error接口 // error接口 type error interface { Error() string } 实现error接口 package main import "fmt" type fileError struct { } //https://blog.youkuaiyun.com/Maggie_up有问题欢迎指正! func (fe *fileError) Error() string { return