SetDirectory joins any relative file paths with dir.
(dir string)
| 149 | |
| 150 | // SetDirectory joins any relative file paths with dir. |
| 151 | func (a *BasicAuth) SetDirectory(dir string) { |
| 152 | if a == nil { |
| 153 | return |
| 154 | } |
| 155 | a.PasswordFile = JoinDir(dir, a.PasswordFile) |
| 156 | a.UsernameFile = JoinDir(dir, a.UsernameFile) |
| 157 | } |
| 158 | |
| 159 | // Authorization contains HTTP authorization credentials. |
| 160 | type Authorization struct { |