range cases { t.Run(c.name, func(t *testing.T) { confDir := "./env/" os.Setenv("DB_PASSWORD", c.expected.DB.Password) // ڥมʹظ͢ΔύεϫʔυΛηοτ ͢Δ res, err := config.NewConfig(confDir, c.appMode) assert.Equal(t, nil, err) assert.Equal(t, c.expected.DB.User, res.DB.User) assert.Equal(t, c.expected.DB.Password, res.DB.Password) assert.Equal(t, c.expected.DB.Host, res.DB.Host) assert.Equal(t, c.expected.DB.Port, res.DB.Port) assert.Equal(t, c.expected.DB.Name, res.DB.Name) }) } } config_test.go