优化API配置格式化

This commit is contained in:
GoEdgeLab
2023-08-12 18:16:17 +08:00
parent 415cf1130b
commit b41c7e2003
2 changed files with 10 additions and 3 deletions

View File

@@ -17,9 +17,9 @@ type APIConfig struct {
OldRPC struct {
Endpoints []string `yaml:"endpoints"`
DisableUpdate bool `yaml:"disableUpdate"`
} `yaml:"rpc"`
} `yaml:"rpc,omitempty"`
RPCEndpoints []string `yaml:"rpc.endpoints" json:"rpc.endpoints"`
RPCEndpoints []string `yaml:"rpc.endpoints,flow" json:"rpc.endpoints"`
RPCDisableUpdate bool `yaml:"rpc.disableUpdate" json:"rpc.disableUpdate"`
NodeId string `yaml:"nodeId"`