MCPcopy Create free account
hub / github.com/compose-generator/compose-generator / getLogfilesPath

Function getLogfilesPath

src/util/env.go:137–156  ·  view source on GitHub ↗

--------------------------------------------------------------- Private functions ---------------------------------------------------------------

()

Source from the content-addressed store, hash-verified

135// --------------------------------------------------------------- Private functions ---------------------------------------------------------------
136
137func 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
158func getCComCompilerPath() string {
159 if isWindows() { // Windows

Callers 7

getLogfilePathFunction · 0.85
TestGetLogfilesPath1Function · 0.85
TestGetLogfilesPath2Function · 0.85
TestGetLogfilesPath3Function · 0.85
TestGetLogfilesPath4Function · 0.85
TestGetLogfilesPath5Function · 0.85
TestGetLogfilesPath6Function · 0.85

Calls

no outgoing calls

Tested by 6

TestGetLogfilesPath1Function · 0.68
TestGetLogfilesPath2Function · 0.68
TestGetLogfilesPath3Function · 0.68
TestGetLogfilesPath4Function · 0.68
TestGetLogfilesPath5Function · 0.68
TestGetLogfilesPath6Function · 0.68