()
| 180 | } |
| 181 | |
| 182 | func GetHishtoryPath() string { |
| 183 | err := ValidateHishtoryPath() |
| 184 | if err != nil { |
| 185 | // This panic() can only trigger if the env variable is changed after process startup |
| 186 | panic(err) |
| 187 | } |
| 188 | hishtoryPath := os.Getenv("HISHTORY_PATH") |
| 189 | if hishtoryPath != "" { |
| 190 | return hishtoryPath |
| 191 | } |
| 192 | return defaultHishtoryPath |
| 193 | } |