1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00

Added zstd constant for linting

This commit is contained in:
Juan Font Alonso 2022-08-14 17:04:07 +02:00
parent 78a179c971
commit 0d0042b7e6
2 changed files with 4 additions and 2 deletions

4
api.go
View File

@ -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().

View File

@ -59,6 +59,8 @@ const (
privateHexPrefix = "privkey:"
PermissionFallback = 0o700
ZstdCompression = "zstd"
)
func MachinePublicKeyStripPrefix(machineKey key.MachinePublic) string {