@@ -27,12 +27,11 @@ func TestFormatNew(t *testing.T) {
2727 "%+v" ,
2828 "error\n " +
2929 "github.com/pkg/errors.TestFormatNew\n " +
30- "\t .+/github.com/pkg/errors/format_test.go:25 " ,
30+ "\t .+/github.com/pkg/errors/format_test.go:26 " ,
3131 }, {
3232 New ("error" ),
3333 "%q" ,
3434 `"error"` ,
35- "\t .+/github.com/pkg/errors/format_test.go:26" ,
3635 }}
3736
3837 for i , tt := range tests {
@@ -58,7 +57,7 @@ func TestFormatErrorf(t *testing.T) {
5857 "%+v" ,
5958 "error\n " +
6059 "github.com/pkg/errors.TestFormatErrorf\n " +
61- "\t .+/github.com/pkg/errors/format_test.go:55 " ,
60+ "\t .+/github.com/pkg/errors/format_test.go:56 " ,
6261 }}
6362
6463 for i , tt := range tests {
@@ -84,7 +83,7 @@ func TestFormatWrap(t *testing.T) {
8483 "%+v" ,
8584 "error\n " +
8685 "github.com/pkg/errors.TestFormatWrap\n " +
87- "\t .+/github.com/pkg/errors/format_test.go:81 " ,
86+ "\t .+/github.com/pkg/errors/format_test.go:82 " ,
8887 }, {
8988 Wrap (io .EOF , "error" ),
9089 "%s" ,
@@ -99,14 +98,14 @@ func TestFormatWrap(t *testing.T) {
9998 "EOF\n " +
10099 "error\n " +
101100 "github.com/pkg/errors.TestFormatWrap\n " +
102- "\t .+/github.com/pkg/errors/format_test.go:95 " ,
101+ "\t .+/github.com/pkg/errors/format_test.go:96 " ,
103102 }, {
104103 Wrap (Wrap (io .EOF , "error1" ), "error2" ),
105104 "%+v" ,
106105 "EOF\n " +
107106 "error1\n " +
108107 "github.com/pkg/errors.TestFormatWrap\n " +
109- "\t .+/github.com/pkg/errors/format_test.go:102 \n " ,
108+ "\t .+/github.com/pkg/errors/format_test.go:103 \n " ,
110109 }, {
111110 Wrap (New ("error with space" ), "context" ),
112111 "%q" ,
@@ -137,7 +136,7 @@ func TestFormatWrapf(t *testing.T) {
137136 "EOF\n " +
138137 "error2\n " +
139138 "github.com/pkg/errors.TestFormatWrapf\n " +
140- "\t .+/github.com/pkg/errors/format_test.go:133 " ,
139+ "\t .+/github.com/pkg/errors/format_test.go:134 " ,
141140 }, {
142141 Wrapf (New ("error" ), "error%d" , 2 ),
143142 "%s" ,
@@ -151,7 +150,7 @@ func TestFormatWrapf(t *testing.T) {
151150 "%+v" ,
152151 "error\n " +
153152 "github.com/pkg/errors.TestFormatWrapf\n " +
154- "\t .+/github.com/pkg/errors/format_test.go:148 " ,
153+ "\t .+/github.com/pkg/errors/format_test.go:149 " ,
155154 }}
156155
157156 for i , tt := range tests {
@@ -177,7 +176,7 @@ func TestFormatWithStack(t *testing.T) {
177176 "%+v" ,
178177 []string {"EOF" ,
179178 "github.com/pkg/errors.TestFormatWithStack\n " +
180- "\t .+/github.com/pkg/errors/format_test.go:171 " },
179+ "\t .+/github.com/pkg/errors/format_test.go:175 " },
181180 }, {
182181 WithStack (New ("error" )),
183182 "%s" ,
@@ -191,36 +190,36 @@ func TestFormatWithStack(t *testing.T) {
191190 "%+v" ,
192191 []string {"error" ,
193192 "github.com/pkg/errors.TestFormatWithStack\n " +
194- "\t .+/github.com/pkg/errors/format_test.go:185 " ,
193+ "\t .+/github.com/pkg/errors/format_test.go:189 " ,
195194 "github.com/pkg/errors.TestFormatWithStack\n " +
196- "\t .+/github.com/pkg/errors/format_test.go:185 " },
195+ "\t .+/github.com/pkg/errors/format_test.go:189 " },
197196 }, {
198197 WithStack (WithStack (io .EOF )),
199198 "%+v" ,
200199 []string {"EOF" ,
201200 "github.com/pkg/errors.TestFormatWithStack\n " +
202- "\t .+/github.com/pkg/errors/format_test.go:193 " ,
201+ "\t .+/github.com/pkg/errors/format_test.go:197 " ,
203202 "github.com/pkg/errors.TestFormatWithStack\n " +
204- "\t .+/github.com/pkg/errors/format_test.go:193 " },
203+ "\t .+/github.com/pkg/errors/format_test.go:197 " },
205204 }, {
206205 WithStack (WithStack (Wrapf (io .EOF , "message" ))),
207206 "%+v" ,
208207 []string {"EOF" ,
209208 "message" ,
210209 "github.com/pkg/errors.TestFormatWithStack\n " +
211- "\t .+/github.com/pkg/errors/format_test.go:201 " ,
210+ "\t .+/github.com/pkg/errors/format_test.go:205 " ,
212211 "github.com/pkg/errors.TestFormatWithStack\n " +
213- "\t .+/github.com/pkg/errors/format_test.go:201 " ,
212+ "\t .+/github.com/pkg/errors/format_test.go:205 " ,
214213 "github.com/pkg/errors.TestFormatWithStack\n " +
215- "\t .+/github.com/pkg/errors/format_test.go:201 " },
214+ "\t .+/github.com/pkg/errors/format_test.go:205 " },
216215 }, {
217216 WithStack (Errorf ("error%d" , 1 )),
218217 "%+v" ,
219218 []string {"error1" ,
220219 "github.com/pkg/errors.TestFormatWithStack\n " +
221- "\t .+/github.com/pkg/errors/format_test.go:212 " ,
220+ "\t .+/github.com/pkg/errors/format_test.go:216 " ,
222221 "github.com/pkg/errors.TestFormatWithStack\n " +
223- "\t .+/github.com/pkg/errors/format_test.go:212 " },
222+ "\t .+/github.com/pkg/errors/format_test.go:216 " },
224223 }}
225224
226225 for i , tt := range tests {
@@ -247,7 +246,7 @@ func TestFormatWithMessage(t *testing.T) {
247246 []string {
248247 "error" ,
249248 "github.com/pkg/errors.TestFormatWithMessage\n " +
250- "\t .+/github.com/pkg/errors/format_test.go:240 " ,
249+ "\t .+/github.com/pkg/errors/format_test.go:244 " ,
251250 "error2" },
252251 }, {
253252 WithMessage (io .EOF , "addition1" ),
@@ -274,32 +273,32 @@ func TestFormatWithMessage(t *testing.T) {
274273 "%+v" ,
275274 []string {"EOF" , "error1" , "error2" ,
276275 "github.com/pkg/errors.TestFormatWithMessage\n " +
277- "\t .+/github.com/pkg/errors/format_test.go:268 " },
276+ "\t .+/github.com/pkg/errors/format_test.go:272 " },
278277 }, {
279278 WithMessage (Errorf ("error%d" , 1 ), "error2" ),
280279 "%+v" ,
281280 []string {"error1" ,
282281 "github.com/pkg/errors.TestFormatWithMessage\n " +
283- "\t .+/github.com/pkg/errors/format_test.go:274 " ,
282+ "\t .+/github.com/pkg/errors/format_test.go:278 " ,
284283 "error2" },
285284 }, {
286285 WithMessage (WithStack (io .EOF ), "error" ),
287286 "%+v" ,
288287 []string {
289288 "EOF" ,
290289 "github.com/pkg/errors.TestFormatWithMessage\n " +
291- "\t .+/github.com/pkg/errors/format_test.go:281 " ,
290+ "\t .+/github.com/pkg/errors/format_test.go:285 " ,
292291 "error" },
293292 }, {
294293 WithMessage (Wrap (WithStack (io .EOF ), "inside-error" ), "outside-error" ),
295294 "%+v" ,
296295 []string {
297296 "EOF" ,
298297 "github.com/pkg/errors.TestFormatWithMessage\n " +
299- "\t .+/github.com/pkg/errors/format_test.go:289 " ,
298+ "\t .+/github.com/pkg/errors/format_test.go:293 " ,
300299 "inside-error" ,
301300 "github.com/pkg/errors.TestFormatWithMessage\n " +
302- "\t .+/github.com/pkg/errors/format_test.go:289 " ,
301+ "\t .+/github.com/pkg/errors/format_test.go:293 " ,
303302 "outside-error" },
304303 }}
305304
@@ -316,11 +315,11 @@ func TestFormatGeneric(t *testing.T) {
316315 {New ("new-error" ), []string {
317316 "new-error" ,
318317 "github.com/pkg/errors.TestFormatGeneric\n " +
319- "\t .+/github.com/pkg/errors/format_test.go:311 " },
318+ "\t .+/github.com/pkg/errors/format_test.go:315 " },
320319 }, {Errorf ("errorf-error" ), []string {
321320 "errorf-error" ,
322321 "github.com/pkg/errors.TestFormatGeneric\n " +
323- "\t .+/github.com/pkg/errors/format_test.go:315 " },
322+ "\t .+/github.com/pkg/errors/format_test.go:319 " },
324323 }, {errors .New ("errors-new-error" ), []string {
325324 "errors-new-error" },
326325 },
@@ -334,21 +333,21 @@ func TestFormatGeneric(t *testing.T) {
334333 func (err error ) error { return WithStack (err ) },
335334 []string {
336335 "github.com/pkg/errors.(func·002|TestFormatGeneric.func2)\n \t " +
337- ".+/github.com/pkg/errors/format_test.go:329 " ,
336+ ".+/github.com/pkg/errors/format_test.go:333 " ,
338337 },
339338 }, {
340339 func (err error ) error { return Wrap (err , "wrap-error" ) },
341340 []string {
342341 "wrap-error" ,
343342 "github.com/pkg/errors.(func·003|TestFormatGeneric.func3)\n \t " +
344- ".+/github.com/pkg/errors/format_test.go:335 " ,
343+ ".+/github.com/pkg/errors/format_test.go:339 " ,
345344 },
346345 }, {
347346 func (err error ) error { return Wrapf (err , "wrapf-error%d" , 1 ) },
348347 []string {
349348 "wrapf-error1" ,
350349 "github.com/pkg/errors.(func·004|TestFormatGeneric.func4)\n \t " +
351- ".+/github.com/pkg/errors/format_test.go:342 " ,
350+ ".+/github.com/pkg/errors/format_test.go:346 " ,
352351 },
353352 },
354353 }
0 commit comments