github.com/MealCraft/glide@v0.13.4/action/import_gom.go (about) 1 package action 2 3 import ( 4 "github.com/Masterminds/glide/gom" 5 "github.com/Masterminds/glide/msg" 6 ) 7 8 // ImportGom imports a Gomfile. 9 func ImportGom(dest string) { 10 base := "." 11 config := EnsureConfig() 12 if !gom.Has(base) { 13 msg.Die("No gom data found.") 14 } 15 deps, err := gom.Parse(base) 16 if err != nil { 17 msg.Die("Failed to extract Gomfile: %s", err) 18 } 19 appendImports(deps, config) 20 writeConfigToFileOrStdout(config, dest) 21 }