فهرست منبع

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(),
 	}
 }