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