mirror of
https://github.com/juanfont/headscale.git
synced 2025-01-19 10:20:05 +09:00
Added zstd constant for linting
This commit is contained in:
parent
78a179c971
commit
0d0042b7e6
2 changed files with 4 additions and 2 deletions
4
api.go
4
api.go
|
@ -407,7 +407,7 @@ func (h *Headscale) getLegacyMapResponseData(
|
|||
}
|
||||
|
||||
var respBody []byte
|
||||
if mapRequest.Compress == "zstd" {
|
||||
if mapRequest.Compress == ZstdCompression {
|
||||
src, err := json.Marshal(resp)
|
||||
if err != nil {
|
||||
log.Error().
|
||||
|
@ -445,7 +445,7 @@ func (h *Headscale) getMapKeepAliveResponse(
|
|||
}
|
||||
var respBody []byte
|
||||
var err error
|
||||
if mapRequest.Compress == "zstd" {
|
||||
if mapRequest.Compress == ZstdCompression {
|
||||
src, err := json.Marshal(mapResponse)
|
||||
if err != nil {
|
||||
log.Error().
|
||||
|
|
2
utils.go
2
utils.go
|
@ -59,6 +59,8 @@ const (
|
|||
privateHexPrefix = "privkey:"
|
||||
|
||||
PermissionFallback = 0o700
|
||||
|
||||
ZstdCompression = "zstd"
|
||||
)
|
||||
|
||||
func MachinePublicKeyStripPrefix(machineKey key.MachinePublic) string {
|
||||
|
|
Loading…
Reference in a new issue