@@ -102,22 +102,22 @@ func Errorf(format string, args ...interface{}) error {
102102 }
103103}
104104
105- // Wrap returns an error annotating the cause with message.
106- // If cause is nil, Wrap returns nil.
107- func Wrap (cause error , message string ) error {
108- if cause == nil {
105+ // Wrap returns an error annotating err with message.
106+ // If err is nil, Wrap returns nil.
107+ func Wrap (err error , message string ) error {
108+ if err == nil {
109109 return nil
110110 }
111- return wrap (cause , message , callers ())
111+ return wrap (err , message , callers ())
112112}
113113
114- // Wrapf returns an error annotating the cause with the format specifier.
115- // If cause is nil, Wrapf returns nil.
116- func Wrapf (cause error , format string , args ... interface {}) error {
117- if cause == nil {
114+ // Wrapf returns an error annotating err with the format specifier.
115+ // If err is nil, Wrapf returns nil.
116+ func Wrapf (err error , format string , args ... interface {}) error {
117+ if err == nil {
118118 return nil
119119 }
120- return wrap (cause , fmt .Sprintf (format , args ... ), callers ())
120+ return wrap (err , fmt .Sprintf (format , args ... ), callers ())
121121}
122122
123123func wrap (err error , msg string , st * stack ) error {
0 commit comments