various minor cleanups and improvements to error handling

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2022-05-04 12:48:28 +02:00
parent 9814c5c382
commit 1fc478b902
11 changed files with 19 additions and 17 deletions

View File

@@ -55,7 +55,7 @@ func waitForSocket(path string) error {
func Connect(path string) (*Client, error) {
if err := waitForSocket(path); err != nil {
return nil, fmt.Errorf("failed to wait for socket: %w", err)
return nil, fmt.Errorf("failed to wait for socket: %s: %w", path, err)
}
tgt := fmt.Sprintf("unix://%s", path)