-
Notifications
You must be signed in to change notification settings - Fork 0
/
module.go
25 lines (22 loc) · 1.04 KB
/
module.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package main
import (
"time"
)
// Module represents `go list -json` output
type Module struct {
Path string `json:",omitempty"` // module path
Version string `json:",omitempty"` // module version
Versions []string `json:",omitempty"` // available module versions
Replace *Module `json:",omitempty"` // replaced by this module
Time *time.Time `json:",omitempty"` // time version was created
Update *Module `json:",omitempty"` // available update (with -u)
Main bool `json:",omitempty"` // is this the main module?
Indirect bool `json:",omitempty"` // module is only indirectly needed by main module
Dir string `json:",omitempty"` // directory holding local copy of files, if any
GoMod string `json:",omitempty"` // path to go.mod file describing module, if any
Error *ModuleError `json:",omitempty"` // error loading module
GoVersion string `json:",omitempty"` // go version used in module
}
type ModuleError struct {
Err string // error text
}