From 5bfae22c8f52019e530c43b9d7bfe4f64ed3b9ef Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 31 May 2022 12:49:41 +0200 Subject: [PATCH] Make config get function global --- cmd/headscale/cli/utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/headscale/cli/utils.go b/cmd/headscale/cli/utils.go index e47677c6..797fba1a 100644 --- a/cmd/headscale/cli/utils.go +++ b/cmd/headscale/cli/utils.go @@ -277,7 +277,7 @@ func absPath(path string) string { return path } -func getHeadscaleConfig() headscale.Config { +func GetHeadscaleConfig() headscale.Config { dnsConfig, baseDomain := GetDNSConfig() derpConfig := GetDERPConfig() logConfig := GetLogTailConfig() @@ -416,7 +416,7 @@ func getHeadscaleApp() (*headscale.Headscale, error) { return nil, err } - cfg := getHeadscaleConfig() + cfg := GetHeadscaleConfig() app, err := headscale.NewHeadscale(cfg) if err != nil { @@ -440,7 +440,7 @@ func getHeadscaleApp() (*headscale.Headscale, error) { } func getHeadscaleCLIClient() (context.Context, v1.HeadscaleServiceClient, *grpc.ClientConn, context.CancelFunc) { - cfg := getHeadscaleConfig() + cfg := GetHeadscaleConfig() log.Debug(). Dur("timeout", cfg.CLI.Timeout).