all: Tweak error creation (#6391)
- In the few places where we wrap errors, use the new Go 1.13 "%w" construction instead of %s or %v. - Where we create errors with constant strings, consistently use errors.New and not fmt.Errorf. - Remove capitalization from errors in the few places where we had that.
This commit is contained in:
+1
-1
@@ -543,7 +543,7 @@ func startHTTP(cfg *mockedConfig) (string, *suture.Supervisor, error) {
|
||||
tcpAddr, err := net.ResolveTCPAddr("tcp", addr)
|
||||
if err != nil {
|
||||
supervisor.Stop()
|
||||
return "", nil, fmt.Errorf("Weird address from API service: %v", err)
|
||||
return "", nil, fmt.Errorf("weird address from API service: %w", err)
|
||||
}
|
||||
|
||||
host, _, _ := net.SplitHostPort(cfg.gui.RawAddress)
|
||||
|
||||
Reference in New Issue
Block a user