diff options
Diffstat (limited to 'vendor/github.com/spkg/bom/discard_go14.go')
-rw-r--r-- | vendor/github.com/spkg/bom/discard_go14.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/spkg/bom/discard_go14.go b/vendor/github.com/spkg/bom/discard_go14.go new file mode 100644 index 000000000..782cd0624 --- /dev/null +++ b/vendor/github.com/spkg/bom/discard_go14.go @@ -0,0 +1,12 @@ +// +build !go1.5 + +package bom + +import "bufio" + +func discardBytes(buf *bufio.Reader, n int) { + // cannot use the buf.Discard method as it was introduced in Go 1.5 + for i := 0; i < n; i++ { + buf.ReadByte() + } +} |