summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/spkg/bom/discard_go14.go
blob: 782cd0624b02c5752c6cb6f22d03a2f3bc106d7f (plain)
1
2
3
4
5
6
7
8
9
10
11
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()
	}
}