Fix failing test case

This commit is contained in:
Junegunn Choi 2023-11-04 16:27:24 +09:00
parent 3f78d76da1
commit c5aa8729a1
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627
1 changed files with 3 additions and 1 deletions

View File

@ -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
}
}