Errors

The ? operator simplifies Go's if err != nil { return err } pattern. Place ? after a call that returns an error to propagate it automatically.

If the error is non-nil, the function returns early with zero values and the error. Note the space before ?.

Try it: Change parsePort("8080") to parsePort("") to trigger an error.