FetchModule downloads the remote module source if necessary. Meant to be run in a goroutine.
(source string, wg *sync.WaitGroup)
| 19 | |
| 20 | // FetchModule downloads the remote module source if necessary. Meant to be run in a goroutine. |
| 21 | func FetchModule(source string, wg *sync.WaitGroup) { |
| 22 | defer wg.Done() |
| 23 | |
| 24 | localPath := GetSourceDir(source) |
| 25 | if !IsLocal(source) { |
| 26 | flog.Debugf("Downloading module: %s to %s", source, localPath) |
| 27 | err := getter.Get(localPath, source) |
| 28 | if err != nil { |
| 29 | exit.Fatal("Failed to fetch remote module from %s: %v\n", source, err) |
| 30 | } |
| 31 | } |
| 32 | return |
| 33 | } |
| 34 | |
| 35 | // ParseModuleConfig loads the local config file for a module and parses the yaml |
| 36 | func ParseModuleConfig(source string) (moduleconfig.ModuleConfig, error) { |
no test coverage detected