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