remove ImportPath from NewInfoFromPath

This commit is contained in:
aperezg 2019-11-10 11:56:09 +01:00
parent 71d20943f0
commit 6a21c5378b
1 changed files with 5 additions and 6 deletions

View File

@ -21,17 +21,16 @@ type Info struct {
func NewInfoFromPath(path string, m Module) Info { func NewInfoFromPath(path string, m Module) Info {
return Info{ return Info{
Dir: path, Dir: path,
ImportPath: "command-line-arguments",
Module: m, Module: m,
} }
} }
func (fi Info) MarshalJSON() ([]byte, error) { func (i Info) MarshalJSON() ([]byte, error) {
mm := map[string]interface{}{ mm := map[string]interface{}{
"ImportPath": fi.ImportPath, "ImportPath": i.ImportPath,
"Name": fi.Name, "Name": i.Name,
"Module": fi.Module, "Module": i.Module,
"Dir": fi.Dir, "Dir": i.Dir,
} }
return json.Marshal(mm) return json.Marshal(mm)