SetDirectory joins any relative file paths with dir.
(dir string)
| 1355 | |
| 1356 | // SetDirectory joins any relative file paths with dir. |
| 1357 | func (c *TLSConfig) SetDirectory(dir string) { |
| 1358 | if c == nil { |
| 1359 | return |
| 1360 | } |
| 1361 | c.CAFile = JoinDir(dir, c.CAFile) |
| 1362 | c.CertFile = JoinDir(dir, c.CertFile) |
| 1363 | c.KeyFile = JoinDir(dir, c.KeyFile) |
| 1364 | } |
| 1365 | |
| 1366 | // UnmarshalYAML implements the yaml.Unmarshaler interface. |
| 1367 | func (c *TLSConfig) UnmarshalYAML(unmarshal func(any) error) error { |