Update golangci-lint to 1.46.0: add some nolints to iprange.
This commit is contained in:
parent
4b9df00fc8
commit
83670b2e31
4 changed files with 5 additions and 1 deletions
|
@ -4,7 +4,7 @@ RUN apt-get update && apt-get install -y \
|
|||
rsync libssl-dev postgresql sudo redis-server \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.45.2
|
||||
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.46.0
|
||||
RUN curl -L "https://github.com/docker/compose/releases/download/1.28.5/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
||||
RUN chmod +x /usr/local/bin/docker-compose
|
||||
RUN curl -fsSL https://get.docker.com | sh
|
||||
|
|
|
@ -25,6 +25,7 @@ func streamRange(lower, upper net.IP) chan net.IP {
|
|||
upper32 := binary.BigEndian.Uint32([]byte(upper))
|
||||
diff := upper32 - lower32
|
||||
|
||||
// nolint
|
||||
if diff < 0 {
|
||||
panic("Lower address is actually higher than upper address.")
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ func (a asc) Less(i, j int) bool {
|
|||
bigi := big.NewInt(0).SetBytes(a[i])
|
||||
bigj := big.NewInt(0).SetBytes(a[j])
|
||||
|
||||
// nolint
|
||||
if bigi.Cmp(bigj) == -1 {
|
||||
return true
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ var ipToknames = [...]string{
|
|||
}
|
||||
var ipStatenames = [...]string{}
|
||||
|
||||
// nolint
|
||||
const ipEofCode = 1
|
||||
const ipErrCode = 2
|
||||
const ipInitialStackSize = 16
|
||||
|
@ -166,6 +167,7 @@ type ipParserImpl struct {
|
|||
char int
|
||||
}
|
||||
|
||||
// nolint
|
||||
func (p *ipParserImpl) Lookahead() int {
|
||||
return p.char
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue