SetDirectory joins any relative file paths with dir.
(dir string)
| 908 | |
| 909 | // SetDirectory joins any relative file paths with dir. |
| 910 | func (c *TLSConfig) SetDirectory(dir string) { |
| 911 | if c == nil { |
| 912 | return |
| 913 | } |
| 914 | c.CAFile = JoinDir(dir, c.CAFile) |
| 915 | c.CertFile = JoinDir(dir, c.CertFile) |
| 916 | c.KeyFile = JoinDir(dir, c.KeyFile) |
| 917 | } |
| 918 | |
| 919 | // UnmarshalYAML implements the yaml.Unmarshaler interface. |
| 920 | func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { |