--------------------------------------------------------------- Private functions ---------------------------------------------------------------
()
| 135 | // --------------------------------------------------------------- Private functions --------------------------------------------------------------- |
| 136 | |
| 137 | func getLogfilesPath() string { |
| 138 | if isDevVersion() { // Dev |
| 139 | return "../log" |
| 140 | } |
| 141 | if isDockerizedEnvironment() { // Docker |
| 142 | return "/cg/log" |
| 143 | } |
| 144 | if isLinux() { // Linux |
| 145 | return "/var/log/compose-generator" |
| 146 | } |
| 147 | // Windows |
| 148 | cacheDir, err := userCacheDir() |
| 149 | if err != nil { |
| 150 | ErrorLogger.Println("Cannot find Windows cache dir: " + err.Error()) |
| 151 | logError("Cannot find Windows cache dir", true) |
| 152 | return "" |
| 153 | } |
| 154 | cacheDir = filepath.ToSlash(cacheDir) |
| 155 | return cacheDir + "/ComposeGenerator/log" |
| 156 | } |
| 157 | |
| 158 | func getCComCompilerPath() string { |
| 159 | if isWindows() { // Windows |
no outgoing calls