优化代码

This commit is contained in:
GoEdgeLab
2022-09-23 11:09:21 +08:00
parent 6bd2ac0d2b
commit 2c0a13698f
18 changed files with 30 additions and 23 deletions

View File

@@ -14,13 +14,7 @@ func TestLoadAPIConfig(t *testing.T) {
}
func TestAPIConfig_WriteFile(t *testing.T) {
config := &APIConfig{
RPC: struct {
Endpoints []string `yaml:"endpoints"`
}{},
NodeId: "1",
Secret: "2",
}
config := &APIConfig{}
err := config.WriteFile("/tmp/api_config.yaml")
if err != nil {
t.Fatal(err)