resetConfigDir is used in testing to reset the "configDir" package variable and its sync.Once to force re-lookup between tests.
()
| 38 | // resetConfigDir is used in testing to reset the "configDir" package variable |
| 39 | // and its sync.Once to force re-lookup between tests. |
| 40 | func resetConfigDir() { |
| 41 | configDir = "" |
| 42 | initConfigDir = new(sync.Once) |
| 43 | } |
| 44 | |
| 45 | // getHomeDir returns the home directory of the current user with the help of |
| 46 | // environment variables depending on the target operating system. |
no outgoing calls
searching dependent graphs…