Skip to content

Commit 05fbace

Browse files
committed
cleanup: remove go1.13 build tags and Makefile
Remove go1.13 build constraints from unwrap functions since go.mod minimum is go1.20. Rename go113.go and go113_test.go to unwrap.go and unwrap_test.go. Delete Makefile as build/test/lint are now handled by Docker Bake targets. Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
1 parent 27a59ff commit 05fbace

File tree

5 files changed

+2
-16
lines changed

5 files changed

+2
-16
lines changed

Makefile

Lines changed: 0 additions & 5 deletions
This file was deleted.

bench_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build go1.7
2-
// +build go1.7
3-
41
package errors
52

63
import (

errors.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ type withStack struct {
159159

160160
func (w *withStack) Cause() error { return w.error }
161161

162-
// Unwrap provides compatibility for Go 1.13 error chains.
162+
// Unwrap provides compatibility for errors.Is and errors.As.
163163
func (w *withStack) Unwrap() error { return w.error }
164164

165165
func (w *withStack) Format(s fmt.State, verb rune) {
@@ -244,7 +244,7 @@ type withMessage struct {
244244
func (w *withMessage) Error() string { return w.msg + ": " + w.cause.Error() }
245245
func (w *withMessage) Cause() error { return w.cause }
246246

247-
// Unwrap provides compatibility for Go 1.13 error chains.
247+
// Unwrap provides compatibility for errors.Is and errors.As.
248248
func (w *withMessage) Unwrap() error { return w.cause }
249249

250250
func (w *withMessage) Format(s fmt.State, verb rune) {

go113.go renamed to unwrap.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build go1.13
2-
// +build go1.13
3-
41
package errors
52

63
import (

go113_test.go renamed to unwrap_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build go1.13
2-
// +build go1.13
3-
41
package errors
52

63
import (

0 commit comments

Comments
 (0)