mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-04-09 02:13:35 +00:00
timeout now a flag on the root command.
It applies to all messages sent new option function WithTimeout added
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user