SaveConfig persists credentials and updates the in-memory copy.
(cfg *config.Config)
| 47 | |
| 48 | // SaveConfig persists credentials and updates the in-memory copy. |
| 49 | func (c *Client) SaveConfig(cfg *config.Config) error { |
| 50 | if err := config.Save(cfg); err != nil { |
| 51 | return err |
| 52 | } |
| 53 | c.Config = cfg |
| 54 | return nil |
| 55 | } |
| 56 | |
| 57 | // ReloadConfig re-reads credentials from disk. |
| 58 | func (c *Client) ReloadConfig() error { |