Skip to content

Commit 63307bd

Browse files
committed
cue: make use of some godoc links
I was looking up the option docs to help answer a question, and spotted a few cases where we can have pkg.go.dev render links. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I75eca1478df98bc0fb8b79bd45c96388da61217e Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1170471 TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Roger Peppe <[email protected]>
1 parent 6c71b2c commit 63307bd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

cue/types.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ func (v Value) Allows(sel Selector) bool {
11631163
// IsConcrete reports whether the current value is a concrete scalar value
11641164
// (not relying on default values), a terminal error, a list, or a struct.
11651165
// It does not verify that values of lists or structs are concrete themselves.
1166-
// To check whether there is a concrete default, use v.Default().IsConcrete().
1166+
// To check whether there is a concrete default, use this method on [Value.Default].
11671167
func (v Value) IsConcrete() bool {
11681168
if v.v == nil {
11691169
return false // any is neither concrete, not a list or struct.
@@ -1527,10 +1527,10 @@ func (v Value) Fields(opts ...Option) (*Iterator, error) {
15271527
// Lookup reports the value at a path starting from v. The empty path returns v
15281528
// itself.
15291529
//
1530-
// The Exists() method can be used to verify if the returned value existed.
1530+
// [Value.Exists] can be used to verify if the returned value existed.
15311531
// Lookup cannot be used to look up hidden or optional fields or definitions.
15321532
//
1533-
// Deprecated: use LookupPath. At some point before v1.0.0, this method will
1533+
// Deprecated: use [Value.LookupPath]. At some point before v1.0.0, this method will
15341534
// be removed to be reused eventually for looking up a selector.
15351535
func (v hiddenValue) Lookup(path ...string) Value {
15361536
ctx := v.ctx()
@@ -1787,10 +1787,10 @@ func (v hiddenValue) Template() func(label string) Value {
17871787
// Without options, the entire value is considered for assumption, which means
17881788
// Subsume tests whether v is a backwards compatible (newer) API version of w.
17891789
//
1790-
// Use the Final option to check subsumption if a w is known to be final, and
1790+
// Use the [Final] option to check subsumption if a w is known to be final, and
17911791
// should assumed to be closed.
17921792
//
1793-
// Use the Raw option to do a low-level subsumption, taking defaults into
1793+
// Use the [Raw] option to do a low-level subsumption, taking defaults into
17941794
// account.
17951795
//
17961796
// Value v and w must be obtained from the same build. TODO: remove this
@@ -1813,7 +1813,7 @@ func (v Value) Subsume(w Value, opts ...Option) error {
18131813
return p.Value(ctx, v.v, w.v)
18141814
}
18151815

1816-
// Deprecated: use Subsume.
1816+
// Deprecated: use [Value.Subsume].
18171817
//
18181818
// Subsumes reports whether w is an instance of v.
18191819
//
@@ -2108,17 +2108,17 @@ func InlineImports(expand bool) Option {
21082108
}
21092109

21102110
// DisallowCycles forces validation in the presence of cycles, even if
2111-
// non-concrete values are allowed. This is implied by Concrete(true).
2111+
// non-concrete values are allowed. This is implied by [Concrete].
21122112
func DisallowCycles(disallow bool) Option {
21132113
return func(p *options) { p.disallowCycles = disallow }
21142114
}
21152115

21162116
// ResolveReferences forces the evaluation of references when outputting.
21172117
//
21182118
// Deprecated: Syntax will now always attempt to resolve dangling references and
2119-
// make the output self-contained. When Final or Concrete is used, it will
2120-
// already attempt to resolve all references.
2121-
// See also InlineImports.
2119+
// make the output self-contained. When [Final] or [Concrete] are used,
2120+
// it will already attempt to resolve all references.
2121+
// See also [InlineImports].
21222122
func ResolveReferences(resolve bool) Option {
21232123
return func(p *options) {
21242124
p.resolveReferences = resolve
@@ -2211,7 +2211,7 @@ func (o *options) updateOptions(opts []Option) {
22112211
// exists.
22122212
//
22132213
// Note that by default not all errors are reported, unless options like
2214-
// Concrete are used. The Final option can be used to check for missing
2214+
// [Concrete] are used. The [Final] option can be used to check for missing
22152215
// required fields.
22162216
func (v Value) Validate(opts ...Option) error {
22172217
o := options{}

0 commit comments

Comments
 (0)