错误处理,是非常重要的。在go语言中,错误处理被设计的十分简单。如果做得好,会在排查问题等方面很有帮助;如果做得不好,就会比较麻烦。从1.0开始,go中定义错误为 error 接口12345// The error built-in interface type is the conventional interface for// representing an error condition, with the nil value representing no error.type error in