mirror of
https://github.com/1f349/lotus.git
synced 2024-12-22 08:04:06 +00:00
Some comments
This commit is contained in:
parent
d970469645
commit
19a112ed2d
@ -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)
|
||||
|
@ -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 }()
|
||||
|
Loading…
Reference in New Issue
Block a user