fix: Function params involve heavy amount of copying (#622)
This commit is contained in:
@@ -276,8 +276,8 @@ type SectionGRPC struct {
|
||||
}
|
||||
|
||||
// LoadConf load config from file and read in environment variables that match
|
||||
func LoadConf(confPath ...string) (ConfYaml, error) {
|
||||
var conf ConfYaml
|
||||
func LoadConf(confPath ...string) (*ConfYaml, error) {
|
||||
conf := &ConfYaml{}
|
||||
|
||||
viper.SetConfigType("yaml")
|
||||
viper.AutomaticEnv() // read in environment variables that match
|
||||
|
||||
@@ -19,8 +19,8 @@ func TestMissingFile(t *testing.T) {
|
||||
|
||||
type ConfigTestSuite struct {
|
||||
suite.Suite
|
||||
ConfGorushDefault ConfYaml
|
||||
ConfGorush ConfYaml
|
||||
ConfGorushDefault *ConfYaml
|
||||
ConfGorush *ConfYaml
|
||||
}
|
||||
|
||||
func (suite *ConfigTestSuite) SetupTest() {
|
||||
|
||||
Reference in New Issue
Block a user