diff --git a/cue/build/instance.go b/cue/build/instance.go index 99cfdfdf818..1c7cbfed747 100644 --- a/cue/build/instance.go +++ b/cue/build/instance.go @@ -211,7 +211,7 @@ func (inst *Instance) addImport(imp *Instance) { // It does not process the file's imports. The package name of the file must // match the package name of the instance. // -// Deprecated: use AddSyntax or wait for this to be renamed using a new +// Deprecated: use [Instance.AddSyntax] or wait for this to be renamed using a new // signature. func (inst *Instance) AddFile(filename string, src interface{}) error { file, err := inst.parse(filename, src) diff --git a/cue/context.go b/cue/context.go index 53e1caf1ac4..3c69e2802a9 100644 --- a/cue/context.go +++ b/cue/context.go @@ -472,7 +472,7 @@ func str(c *adt.OpContext, v adt.Node) string { // eval returns the evaluated value. This may not be the vertex. // -// Deprecated: use ctx.value +// Deprecated: use [adt.OpContext.value]. func (v Value) eval(ctx *adt.OpContext) adt.Value { if v.v == nil { panic("undefined value") diff --git a/cue/types.go b/cue/types.go index 7cbb7f6b85f..a3fbe349fd3 100644 --- a/cue/types.go +++ b/cue/types.go @@ -684,7 +684,7 @@ func remakeValue(base Value, env *adt.Environment, v adt.Expr) Value { return makeChildValue(base.parent(), n) } -func remakeFinal(base Value, env *adt.Environment, v adt.Value) Value { +func remakeFinal(base Value, v adt.Value) Value { n := &adt.Vertex{Parent: base.v.Parent, Label: base.v.Label, BaseValue: v} n.ForceDone() return makeChildValue(base.parent(), n) @@ -1092,7 +1092,7 @@ func (v Value) checkKind(ctx *adt.OpContext, want adt.Kind) *adt.Bottom { func makeInt(v Value, x int64) Value { n := &adt.Num{K: adt.IntKind} n.X.SetInt64(int64(x)) - return remakeFinal(v, nil, n) + return remakeFinal(v, n) } // Len returns the number of items of the underlying value. @@ -1106,7 +1106,7 @@ func (v Value) Len() Value { n := &adt.Num{K: adt.IntKind} n.X.SetInt64(int64(len(x.Elems()))) if x.IsClosedList() { - return remakeFinal(v, nil, n) + return remakeFinal(v, n) } // Note: this HAS to be a Conjunction value and cannot be // an adt.BinaryExpr, as the expressions would be considered @@ -1116,7 +1116,7 @@ func (v Value) Len() Value { &adt.BasicType{K: adt.IntKind}, &adt.BoundValue{Op: adt.GreaterEqualOp, Value: n}, }} - return remakeFinal(v, nil, c) + return remakeFinal(v, c) } case *adt.Bytes: @@ -1329,7 +1329,7 @@ type hiddenStruct = Struct // Deprecated: only used by deprecated functions. type FieldInfo struct { Selector string - Name string // Deprecated: use Selector + Name string // Deprecated: use [FieldInfo.Selector] Pos int Value Value @@ -1968,7 +1968,7 @@ func Schema() Option { // Concrete ensures that all values are concrete. // -// For Validate this means it returns an error if this is not the case. +// For [Validate] this means it returns an error if this is not the case. // In other cases a non-concrete value will be replaced with an error. func Concrete(concrete bool) Option { return func(p *options) {