RetrievePath takes an array whose first element may contain an overridden path and converts either this, or the default of "." to an absolute path using Go's file utilities. This is then passed to SanitisedPath with the current OS to get it into a Docker ready format.
(targetDirs []string)
| 58 | // using Go's file utilities. This is then passed to SanitisedPath with the |
| 59 | // current OS to get it into a Docker ready format. |
| 60 | func RetrievePath(targetDirs []string) string { |
| 61 | path := "." |
| 62 | if len(targetDirs) > 0 { |
| 63 | path = targetDirs[0] |
| 64 | } |
| 65 | absPath, _ := filepath.Abs(path) |
| 66 | return SanitisePath(absPath, runtime.GOOS) |
| 67 | } |
| 68 | |
| 69 | // AddPrefix takes a string slice and returns a new string slice |
| 70 | // with the supplied prefix inserted before every string in the |
nothing calls this directly
no test coverage detected