Skip to content

Commit

Permalink
Return the struct directly
Browse files Browse the repository at this point in the history
No need to create an empty struct and then fill in the data.

Change-Id: I3e1622c0c7ee144c3164cecc49f5cf6d75b9ec32
Signed-off-by: Baohua Yang <baohua.yang@oracle.com>
Signed-off-by: Baohua Yang <yangbaohua@gmail.com>
  • Loading branch information
yeasy authored and denyeart committed Nov 21, 2023
1 parent 3be05d4 commit 5566fcf
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/ledger/kvledger/benchmark/experiments/conf.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ type configuration struct {

// emptyConf returns a an empty configuration (with nested structure only)
func emptyConf() *configuration {
conf := &configuration{}
conf.chainMgrConf = &chainmgmt.ChainMgrConf{}
conf.batchConf = &chainmgmt.BatchConf{}
conf.txConf = &txConf{}
conf.dataConf = &dataConf{}
return conf
return &configuration{
chainMgrConf: &chainmgmt.ChainMgrConf{},
batchConf: &chainmgmt.BatchConf{},
txConf: &txConf{},
dataConf: &dataConf{},
}
}

// confFromTestParams consumes the parameters passed by an experiment
Expand Down

0 comments on commit 5566fcf

Please sign in to comment.