addOptions expects options in the form of "option=value" or "option value". It will override any existing option with the same key to prevent duplicates. Invalid options will return an error.
(options ...string)
| 64 | // It will override any existing option with the same key to prevent duplicates. |
| 65 | // Invalid options will return an error. |
| 66 | func (o *sshConfigOptions) addOptions(options ...string) error { |
| 67 | for _, option := range options { |
| 68 | err := o.addOption(option) |
| 69 | if err != nil { |
| 70 | return err |
| 71 | } |
| 72 | } |
| 73 | return nil |
| 74 | } |
| 75 | |
| 76 | func (o *sshConfigOptions) addOption(option string) error { |
| 77 | key, value, err := codersdk.ParseSSHConfigOption(option) |