mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-25 05:37:31 +00:00
chore: apply format and lint
This commit is contained in:
@@ -107,7 +107,10 @@ func (h *Headscale) DERPHandler(ctx *gin.Context) {
|
||||
hijacker, ok := ctx.Writer.(http.Hijacker)
|
||||
if !ok {
|
||||
log.Error().Caller().Msg("DERP requires Hijacker interface from Gin")
|
||||
ctx.String(http.StatusInternalServerError, "HTTP does not support general TCP support")
|
||||
ctx.String(
|
||||
http.StatusInternalServerError,
|
||||
"HTTP does not support general TCP support",
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -115,7 +118,10 @@ func (h *Headscale) DERPHandler(ctx *gin.Context) {
|
||||
netConn, conn, err := hijacker.Hijack()
|
||||
if err != nil {
|
||||
log.Error().Caller().Err(err).Msgf("Hijack failed")
|
||||
ctx.String(http.StatusInternalServerError, "HTTP does not support general TCP support")
|
||||
ctx.String(
|
||||
http.StatusInternalServerError,
|
||||
"HTTP does not support general TCP support",
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
@@ -163,7 +169,10 @@ func (h *Headscale) DERPBootstrapDNSHandler(ctx *gin.Context) {
|
||||
for _, node := range region.Nodes { // we don't care if we override some nodes
|
||||
addrs, err := r.LookupIP(resolvCtx, "ip", node.HostName)
|
||||
if err != nil {
|
||||
log.Trace().Caller().Err(err).Msgf("bootstrap DNS lookup failed %q", node.HostName)
|
||||
log.Trace().
|
||||
Caller().
|
||||
Err(err).
|
||||
Msgf("bootstrap DNS lookup failed %q", node.HostName)
|
||||
|
||||
continue
|
||||
}
|
||||
|
Reference in New Issue
Block a user