timeout now a flag on the root command.

It applies to all messages sent

new option function WithTimeout added
This commit is contained in:
2026-02-06 11:28:40 +00:00
parent 1ad214ba4a
commit 3f8861ded2
13 changed files with 223 additions and 93 deletions

View File

@@ -22,8 +22,11 @@ func (s *Snapshot) Name(index int) (string, error) {
return "", err
}
resp := <-s.client.respChan
name, ok := resp.Arguments[0].(string)
msg, err := s.client.ReceiveMessage()
if err != nil {
return "", err
}
name, ok := msg.Arguments[0].(string)
if !ok {
return "", fmt.Errorf("unexpected argument type for snapshot name")
}