Skip to content

Commit

Permalink
Fix failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Nov 4, 2023
1 parent 3f78d76 commit c5aa872
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ func startHttpServer(address string, actionChannel chan []*action, responseChann
if len(parts) < 2 {
return fmt.Errorf("cannot extract port: %s", addr), port
}
if port, err := strconv.Atoi(parts[len(parts)-1]); err != nil {
var err error
port, err = strconv.Atoi(parts[len(parts)-1])
if err != nil {
return err, port
}
}
Expand Down

0 comments on commit c5aa872

Please sign in to comment.