Decode reads r into a Config, or returns an error if r could not be parsed as an SSH config file.
(r io.Reader)
| 298 | // Decode reads r into a Config, or returns an error if r could not be parsed as |
| 299 | // an SSH config file. |
| 300 | func Decode(r io.Reader) (*Config, error) { |
| 301 | b, err := io.ReadAll(r) |
| 302 | if err != nil { |
| 303 | return nil, err |
| 304 | } |
| 305 | return decodeBytes(b, false, 0) |
| 306 | } |
| 307 | |
| 308 | // DecodeBytes reads b into a Config, or returns an error if r could not be |
| 309 | // parsed as an SSH config file. |