Skip to content

Commit

Permalink
add an err handling for configfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Shu Kutsuzawa committed Mar 16, 2021
1 parent af99292 commit 110d1de
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion internal/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ func run(ctx context.Context, opt *Opt) error {
termCh := make(chan os.Signal, 1)
signal.Notify(termCh, syscall.SIGTERM, syscall.SIGINT)

config, _ := config.Parse(opt.ConfigPATH)
config, err := config.Parse(opt.ConfigPATH)
if err != nil {
return err
}
s := http.NewServer(opt.Port, config)
errCh := make(chan error, 1)

Expand Down

0 comments on commit 110d1de

Please sign in to comment.