From 201427ba2424a2cbb2d9a763b1eb3a98e5ccdb53 Mon Sep 17 00:00:00 2001 From: Didier Lafforgue Date: Tue, 3 Dec 2024 00:07:35 +0100 Subject: [PATCH] chore: lint the code --- internal/server/service.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/internal/server/service.go b/internal/server/service.go index 864d2f6..650db1c 100644 --- a/internal/server/service.go +++ b/internal/server/service.go @@ -337,14 +337,13 @@ func (s *Service) createCertManager(hosts []string, options ServiceOptions) (Cer } func (s *Service) createAutoCertHostPolicy(hosts []string, options ServiceOptions) (autocert.HostPolicy, error) { - slog.Info("createAutoCertHostPolicy called", options.TLSOnDemandUrl, len(hosts), "🚨", "ok") + slog.Info("createAutoCertHostPolicy called", "url", options.TLSOnDemandUrl) if options.TLSOnDemandUrl == "" { return autocert.HostWhitelist(hosts...), nil } _, err := url.ParseRequestURI(options.TLSOnDemandUrl) - if err != nil { slog.Error("Unable to parse the tls_on_demand_url URL") return nil, err @@ -353,10 +352,9 @@ func (s *Service) createAutoCertHostPolicy(hosts []string, options ServiceOption slog.Info("Will use the tls_on_demand_url URL") return func(ctx context.Context, host string) error { - slog.Info("Get a certificate for", host, "🤞") + slog.Info("Get a certificate", "host", host) resp, err := http.Get(fmt.Sprintf("%s?host=%s", options.TLSOnDemandUrl, url.QueryEscape(host))) - if err != nil { slog.Error("Unable to reach the TLS on demand URL", host, err) return err