浏览代码

rename errors.New parameter to message

Dave Cheney 9 年之前
父节点
当前提交
784931b43c
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      errors.go

+ 3 - 3
errors.go

@@ -108,10 +108,10 @@ func (e _error) Format(s fmt.State, verb rune) {
 	}
 }
 
-// New returns an error that formats as the given text.
-func New(text string) error {
+// New returns an error with the supplied message.
+func New(message string) error {
 	return _error{
-		text,
+		message,
 		callers(),
 	}
 }