Skip to content

Commit

Permalink
refactor: panic when config file path is not specify
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain committed Jul 1, 2024
1 parent aed160c commit 1191c93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func Restart(ctx context.Context) error {

func ReadInConfig(path string) error {
if path == "" {
path = "./default.yaml"
panic("config file path must not be empty")
}
if err := config.GlobalConfig.ReadInConfig(path); err != nil {
return err
Expand Down

0 comments on commit 1191c93

Please sign in to comment.