From 19a112ed2d3cf731c56c82630a303dd9f4e62068 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Sat, 25 Nov 2023 12:59:09 +0000 Subject: [PATCH] Some comments --- cmd/lotus/main.go | 3 +++ sendmail/sendmail_test.go | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/lotus/main.go b/cmd/lotus/main.go index c84269b..12c0e54 100644 --- a/cmd/lotus/main.go +++ b/cmd/lotus/main.go @@ -23,6 +23,7 @@ func main() { return } + // load config file openConf, err := os.Open(configPath) if err != nil { if os.IsNotExist(err) { @@ -33,6 +34,7 @@ func main() { return } + // decode config file var conf Conf err = yaml.NewDecoder(openConf).Decode(&conf) if err != nil { @@ -42,6 +44,7 @@ func main() { wd := filepath.Dir(configPath) + // load mjwt public key verify, err := mjwt.NewMJwtVerifierFromFile(filepath.Join(wd, "signer.public.pem")) if err != nil { log.Fatalf("[Lotus] Failed to load MJWT verifier public key from file '%s': %s", filepath.Join(wd, "signer.public.pem"), err) diff --git a/sendmail/sendmail_test.go b/sendmail/sendmail_test.go index 6792801..333dac9 100644 --- a/sendmail/sendmail_test.go +++ b/sendmail/sendmail_test.go @@ -36,11 +36,9 @@ func init() { func TestSendMail_Send(t *testing.T) { execCommand = func(name string, arg ...string) *exec.Cmd { - log.Println("Hello") cs := append([]string{"-test.run=TestSendMailHelperProcess", "--", name}, arg...) cmd := exec.Command(os.Args[0], cs...) cmd.Env = []string{"GO_WANT_HELPER_PROCESS=1"} - log.Println(cmd.Path) return cmd } defer func() { execCommand = exec.Command }()