forked from mirror/pkger
remove ImportPath from NewInfoFromPath
This commit is contained in:
parent
71d20943f0
commit
6a21c5378b
11
here/info.go
11
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)
|
||||
|
|
Loading…
Reference in New Issue