mirror of
https://github.com/juanfont/headscale.git
synced 2024-12-24 08:47:49 +00:00
Added zstd constant for linting
This commit is contained in:
parent
78a179c971
commit
0d0042b7e6
4
api.go
4
api.go
@ -407,7 +407,7 @@ func (h *Headscale) getLegacyMapResponseData(
|
|||||||
}
|
}
|
||||||
|
|
||||||
var respBody []byte
|
var respBody []byte
|
||||||
if mapRequest.Compress == "zstd" {
|
if mapRequest.Compress == ZstdCompression {
|
||||||
src, err := json.Marshal(resp)
|
src, err := json.Marshal(resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().
|
log.Error().
|
||||||
@ -445,7 +445,7 @@ func (h *Headscale) getMapKeepAliveResponse(
|
|||||||
}
|
}
|
||||||
var respBody []byte
|
var respBody []byte
|
||||||
var err error
|
var err error
|
||||||
if mapRequest.Compress == "zstd" {
|
if mapRequest.Compress == ZstdCompression {
|
||||||
src, err := json.Marshal(mapResponse)
|
src, err := json.Marshal(mapResponse)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error().
|
log.Error().
|
||||||
|
2
utils.go
2
utils.go
@ -59,6 +59,8 @@ const (
|
|||||||
privateHexPrefix = "privkey:"
|
privateHexPrefix = "privkey:"
|
||||||
|
|
||||||
PermissionFallback = 0o700
|
PermissionFallback = 0o700
|
||||||
|
|
||||||
|
ZstdCompression = "zstd"
|
||||||
)
|
)
|
||||||
|
|
||||||
func MachinePublicKeyStripPrefix(machineKey key.MachinePublic) string {
|
func MachinePublicKeyStripPrefix(machineKey key.MachinePublic) string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user