Skip to content

Commit b61e860

Browse files
committed
rename config constructor
1 parent a7e53e0 commit b61e860

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

cmd/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func main() {
2222
path = envPath
2323
}
2424

25-
cfg, err := config.NewConfig(path)
25+
cfg, err := config.New(path)
2626
if err != nil {
2727
slog.Error("Config error: " + err.Error())
2828
os.Exit(1)

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type (
2929
}
3030
)
3131

32-
func NewConfig(path string) (*Config, error) {
32+
func New(path string) (*Config, error) {
3333
cfg := &Config{}
3434

3535
err := cleanenv.ReadConfig(path, cfg)

test/server_integration_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ var (
2626
)
2727

2828
func TestMain(m *testing.M) {
29-
cfg, err := config.NewConfig("../configs/config.test.yml")
29+
cfg, err := config.New("../configs/config.test.yml")
3030
if err != nil {
3131
panic(err)
3232
}

0 commit comments

Comments
 (0)