mirror of https://github.com/markbates/pkger.git
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 {
|
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)
|
||||||
|
|
Loading…
Reference in New Issue