From 7c8e1e27a2ff982ff482d9cbddfd1901143297a4 Mon Sep 17 00:00:00 2001 From: pupilcc Date: Wed, 10 Jan 2024 00:51:02 +0800 Subject: [PATCH] feat: remove command output print --- middleware/acme.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/middleware/acme.go b/middleware/acme.go index 33554e0..0083130 100644 --- a/middleware/acme.go +++ b/middleware/acme.go @@ -47,11 +47,10 @@ func Issue(name string) { alias := os.Getenv("ACME_ALIAS") cmd := exec.Command(filepath.Join(usr.HomeDir, ".acme.sh/acme.sh"), "--issue", "--dns", dns, "-d", name, "--challenge-alias", alias) - output, err := cmd.CombinedOutput() + _, err := cmd.CombinedOutput() if err != nil { logger.Error("Running command failed with %s\n", zap.String("error", err.Error())) } - logger.Info("command", zap.String("command output:", string(output))) } func Install(name string, id string) { @@ -59,9 +58,8 @@ func Install(name string, id string) { cmd := exec.Command(filepath.Join(usr.HomeDir, ".acme.sh/acme.sh"), "--install-cert", "-d", name, "--key-file", filepath.Join(service.CertPath, id+".key"), "--fullchain-file", filepath.Join(service.CertPath, id+".crt")) logger.Info("command", zap.String("Running command:", strings.Join(cmd.Args, " "))) - output, err := cmd.CombinedOutput() + _, err := cmd.CombinedOutput() if err != nil { logger.Error("Running command failed with %s\n", zap.String("error", err.Error())) } - logger.Info("command", zap.String("command output:", string(output))) }