-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add package and module struct fields comments
Signed-off-by: Norman Meier <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package packages | ||
|
||
// ported from https://cs.opensource.google/go/go/+/refs/tags/go1.23.2:src/cmd/go/internal/load/pkg.go | ||
type Package struct { | ||
Dir string `json:",omitempty"` // directory containing package sources | ||
ImportPath string `json:",omitempty"` // import path of package in dir | ||
Name string `json:",omitempty"` // package name | ||
Root string `json:",omitempty"` // Go root, Go path dir, or module root dir containing this package | ||
Module Module `json:",omitempty"` // info about package's module, if any | ||
Match []string `json:",omitempty"` // command-line patterns matching this package | ||
GnoFiles []string `json:",omitempty"` // .gno source files (TestGnoFiles, FiletestGnoFiles) | ||
Imports []string `json:",omitempty"` // import paths used by this package | ||
Deps []string `json:",omitempty"` // all (recursively) imported dependencies | ||
TestGnoFiles []string `json:",omitempty"` // _test.gno files in package | ||
TestImports []string `json:",omitempty"` // imports from TestGnoFiles | ||
FiletestGnoFiles []string `json:",omitempty"` // _filetest.gno files in package | ||
FiletestImports []string `json:",omitempty"` // imports from FiletestGnoFiles | ||
Errors []error `json:",omitempty"` // error loading this package (not dependencies) | ||
} | ||
|
||
// ported from https://cs.opensource.google/go/go/+/refs/tags/go1.23.2:src/cmd/go/internal/modinfo/info.go | ||
type Module struct { | ||
Path string `json:",omitempty"` // module path | ||
Dir string `json:",omitempty"` // directory holding local copy of files, if any | ||
GnoMod string `json:",omitempty"` // path to gno.mod file describing module, if any | ||
} |