Skip to content

Commit

Permalink
all: tidy up a number of leftover Go mentions
Browse files Browse the repository at this point in the history
All of these were carried over from Go, or are slip-ups given
the similarities of the two languages and implementations.

In cue/load, the "based on" notice is already in loader.go,
so it's unnecessary to duplicate it in instances.go.

Signed-off-by: Daniel Martí <[email protected]>
Change-Id: I908cd168882aebb395df96ac878dea4c7d247cbe
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1194431
TryBot-Result: CUEcueckoo <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Paul Jolly <[email protected]>
  • Loading branch information
mvdan committed May 8, 2024
1 parent 4ed59e7 commit 495feee
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
2 changes: 1 addition & 1 deletion cue/load/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (p *PackageError) Error() string {
type NoFilesError struct {
Package *build.Instance

ignored bool // whether any Go files were ignored due to build tags
ignored bool // whether any CUE files were ignored due to build tags
}

func (e *NoFilesError) Position() token.Pos { return token.NoPos }
Expand Down
5 changes: 0 additions & 5 deletions cue/load/instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@

package load

// Files in package are to a large extent based on Go files from the following
// Go packages:
// - cmd/go/internal/load
// - go/build

import (
"context"
"fmt"
Expand Down
5 changes: 2 additions & 3 deletions cue/parser/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,8 @@ func ParseFile(filename string, src interface{}, mode ...Option) (f *ast.File, e

// set result values
if f == nil {
// source is not a valid Go source file - satisfy
// ParseFile API and return a valid (but) empty
// *File
// source is not a valid CUE source file - satisfy
// ParseFile API and return a valid (but) empty *File
f = &ast.File{
// Scope: NewScope(nil),
}
Expand Down
2 changes: 1 addition & 1 deletion cue/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ func (p *parser) parseFile() *ast.File {
c := p.comments

// Don't bother parsing the rest if we had errors scanning the first
// Likely not a Go source file at all.
// Likely not a CUE source file at all.
if p.errors != nil {
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion internal/mod/mvs/mvs.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ type DowngradeReqs[V comparable] interface {

// BuildList returns the build list for the target module.
//
// target is the root vertex of a module requirement graph. For cmd/go, this is
// target is the root vertex of a module requirement graph. For cmd/cue, this is
// typically the main module, but note that this algorithm is not intended to
// be Go-specific: module paths and versions are treated as opaque values.
//
Expand Down
2 changes: 1 addition & 1 deletion mod/modzip/zip.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import (

const (
// MaxZipFile is the maximum size in bytes of a module zip file. The
// go command will report an error if either the zip file or its extracted
// cue command will report an error if either the zip file or its extracted
// content is larger than this.
MaxZipFile = 500 << 20

Expand Down

0 comments on commit 495feee

Please sign in to comment.