Add and fix stylecheck (golint replacement)
This commit is contained in:
parent
0c005a6b01
commit
715542ac1c
21 changed files with 83 additions and 83 deletions
6
api.go
6
api.go
|
@ -18,7 +18,7 @@ import (
|
|||
"tailscale.com/types/wgkey"
|
||||
)
|
||||
|
||||
const RESERVED_RESPONSE_HEADER_SIZE = 4
|
||||
const reservedResponseHeaderSize = 4
|
||||
|
||||
// KeyHandler provides the Headscale pub key
|
||||
// Listens in /key.
|
||||
|
@ -367,7 +367,7 @@ func (h *Headscale) getMapResponse(
|
|||
}
|
||||
}
|
||||
// declare the incoming size on the first 4 bytes
|
||||
data := make([]byte, RESERVED_RESPONSE_HEADER_SIZE)
|
||||
data := make([]byte, reservedResponseHeaderSize)
|
||||
binary.LittleEndian.PutUint32(data, uint32(len(respBody)))
|
||||
data = append(data, respBody...)
|
||||
|
||||
|
@ -397,7 +397,7 @@ func (h *Headscale) getMapKeepAliveResponse(
|
|||
return nil, err
|
||||
}
|
||||
}
|
||||
data := make([]byte, RESERVED_RESPONSE_HEADER_SIZE)
|
||||
data := make([]byte, reservedResponseHeaderSize)
|
||||
binary.LittleEndian.PutUint32(data, uint32(len(respBody)))
|
||||
data = append(data, respBody...)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue