mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-30 07:05:06 +03:00
Fix -json flag when running -genconf
This commit is contained in:
parent
7352891564
commit
7444c46aa1
1 changed files with 2 additions and 2 deletions
|
@ -65,7 +65,7 @@ func (cfg *NodeConfig) NewSigningKeys() {
|
|||
// MarshalJSON exports the configuration into JSON format. No comments are
|
||||
// included in the JSON export as comments are not valid in pure JSON.
|
||||
func (cfg *NodeConfig) MarshalJSON() ([]byte, error) {
|
||||
bs, err := json.MarshalIndent(cfg, "", " ")
|
||||
bs, err := json.MarshalIndent(*cfg, "", " ")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ func (cfg *NodeConfig) MarshalJSON() ([]byte, error) {
|
|||
// MarshalHJSON exports the configuration into HJSON format, complete with
|
||||
// comments describing what each configuration item does.
|
||||
func (cfg *NodeConfig) MarshalHJSON() ([]byte, error) {
|
||||
bs, err := hjson.Marshal(cfg)
|
||||
bs, err := hjson.Marshal(*cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue