Skip to content

Commit

Permalink
cue: fix typos in the Hid function documentation
Browse files Browse the repository at this point in the history
Closes #2847 as merged as of commit 127554b.

Signed-off-by: kharf <kevinfritz210@gmail.com>
Change-Id: I2ddb2b25831377e0734a70c29b0015c0587332c3
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1177403
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@gmail.com>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>
  • Loading branch information
kharf authored and mvdan committed Feb 28, 2024
1 parent 5b4a581 commit 723438a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cue/path.go
Expand Up @@ -467,9 +467,9 @@ func isHiddenOrDefinition(s string) bool {
return strings.HasPrefix(s, "#") || strings.HasPrefix(s, "_")
}

// Hid returns a selector for a hidden field. It panics is pkg is empty.
// Hid returns a selector for a hidden field. It panics if pkg is empty.
// Hidden fields are scoped by package, and pkg indicates for which package
// the hidden field must apply.For anonymous packages, it must be set to "_".
// the hidden field must apply. For anonymous packages, it must be set to "_".
func Hid(name, pkg string) Selector {
if !ast.IsValidIdent(name) {
panic(fmt.Sprintf("invalid identifier %s", name))
Expand Down

0 comments on commit 723438a

Please sign in to comment.