chore(errors): review all errors in codebase

This commit is contained in:
Quentin McGaw
2022-02-20 02:58:16 +00:00
parent ac4a4f83fc
commit 920ad8b54b
88 changed files with 254 additions and 460 deletions

View File

@@ -23,12 +23,12 @@ type ControlServer struct {
func (c ControlServer) validate() (err error) {
_, portStr, err := net.SplitHostPort(*c.Address)
if err != nil {
return fmt.Errorf("%w: %s", ErrControlServerAddress, err)
return fmt.Errorf("listening address is not valid: %w", err)
}
port, err := strconv.Atoi(portStr)
if err != nil {
return fmt.Errorf("%w: %s", ErrControlServerPort, err)
return fmt.Errorf("listening port it not valid: %w", err)
}
uid := os.Getuid()