this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

cue: point out cue/format exists in the godoc

Given that stringifying a CUE value is a rather common need,
and none of the methods or types in this package help with that.

We also add a similar note to the String method,
as we anticipate that some users will look there first.

While here, stop listing the deprecated types;
that takes up valuable space and mental capacity for the reader,
and the types themselves already have visible deprecation notices.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I97f0f7ed99dbd4eb5ebdf6a76d0c8a2a91129a4d
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1230079
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+4 -10
+3 -10
cue/cue.go
··· 26 26 // 27 27 // While a context can be used to build values, note that loading a module and its 28 28 // dependencies should be done with the [cuelang.org/go/cue/load] package. 29 + // To print a value into its string syntax form, use [cuelang.org/go/cue/format]. 29 30 // 30 - // Note that the following types are DEPRECATED and their usage should be 31 - // avoided if possible: 32 - // 33 - // - [FieldInfo] 34 - // - [Instance] 35 - // - [Runtime] 36 - // - [Struct] 37 - // 38 - // Many types also have deprecated methods. Code that already uses deprecated 39 - // methods can keep using them for at least some time. We aim to provide a 31 + // Note that some types and funcs are deprecated. Code that already uses deprecated 32 + // funcs can keep using them for at least some time. We aim to provide a 40 33 // go or cue fix solution to automatically rewrite code using the new API. 41 34 package cue
+1
cue/types.go
··· 1295 1295 } 1296 1296 1297 1297 // String returns the string value if v is a string or an error otherwise. 1298 + // To stringify a CUE value into text form, use [cuelang.org/go/cue/format]. 1298 1299 func (v Value) String() (string, error) { 1299 1300 v, _ = v.Default() 1300 1301 if str, _ := v.v.BaseValue.(*adt.String); str != nil {