From 6a21c5378bd73af5dca3c9f3c9e264737e830bfc Mon Sep 17 00:00:00 2001 From: aperezg Date: Sun, 10 Nov 2019 11:56:09 +0100 Subject: [PATCH] remove ImportPath from NewInfoFromPath --- here/info.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/here/info.go b/here/info.go index 2ac9489..21c447b 100644 --- a/here/info.go +++ b/here/info.go @@ -21,17 +21,16 @@ type Info struct { func NewInfoFromPath(path string, m Module) Info { return Info{ Dir: path, - ImportPath: "command-line-arguments", Module: m, } } -func (fi Info) MarshalJSON() ([]byte, error) { +func (i Info) MarshalJSON() ([]byte, error) { mm := map[string]interface{}{ - "ImportPath": fi.ImportPath, - "Name": fi.Name, - "Module": fi.Module, - "Dir": fi.Dir, + "ImportPath": i.ImportPath, + "Name": i.Name, + "Module": i.Module, + "Dir": i.Dir, } return json.Marshal(mm)