ClearLastConfigIfDifferent clears the recorded last-config if the provided source file/adapter do not match the recorded last-config. If both srcFile and srcAdapter are empty, the last-config is cleared.
(srcFile, srcAdapter string)
| 1271 | // source file/adapter do not match the recorded last-config. If both srcFile |
| 1272 | // and srcAdapter are empty, the last-config is cleared. |
| 1273 | func ClearLastConfigIfDifferent(srcFile, srcAdapter string) { |
| 1274 | if (srcFile != "" || srcAdapter != "") && lastConfigMatches(srcFile, srcAdapter) { |
| 1275 | return |
| 1276 | } |
| 1277 | SetLastConfig("", "", nil) |
| 1278 | } |
| 1279 | |
| 1280 | // getLastConfig returns the last-known config file and adapter. |
| 1281 | func getLastConfig() (file, adapter string, fn reloadFromSourceFunc) { |
no test coverage detected