Skip to content

Commit

Permalink
cue/build: clean up the Instance docs a bit
Browse files Browse the repository at this point in the history
Add a link, remove a redundant inline comment,
and add an empty line so that a section separator is not joined with
the godoc for the following field.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I5810defec7507bffc281a948b1b6ff988eabf466
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1206581
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
  • Loading branch information
mvdan committed Jan 3, 2025
1 parent 41d0797 commit e44b17d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cue/build/instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type Instance struct {

// ImportPath returns the unique path to identify an imported instance.
//
// Instances created with NewInstance do not have an import path.
// Instances created with [Context.NewInstance] do not have an import path.
ImportPath string

// Imports lists the instances of all direct imports of this instance.
Expand Down Expand Up @@ -84,7 +84,7 @@ type Instance struct {
// instance has no imports.
// If Module != "", this corresponds to the module root.
// Root/pkg is the directory that holds third-party packages.
Root string // root directory of hierarchy ("" if unknown)
Root string

// Dir is the package directory. A package may also include files from
// ancestor directories, up to the module file.
Expand All @@ -96,6 +96,7 @@ type Instance struct {
Incomplete bool `api:"alpha"`

// Dependencies

// ImportPaths gives the transitive dependencies of all imports.
ImportPaths []string `api:"alpha"`
ImportPos map[string][]token.Pos `api:"alpha"` // line information for Imports
Expand Down

0 comments on commit e44b17d

Please sign in to comment.