cuelang.org/go@v0.10.1/cue/cue.go (about) 1 // Copyright 2020 CUE Authors 2 // 3 // Licensed under the Apache License, Version 2.0 (the "License"); 4 // you may not use this file except in compliance with the License. 5 // You may obtain a copy of the License at 6 // 7 // http://www.apache.org/licenses/LICENSE-2.0 8 // 9 // Unless required by applicable law or agreed to in writing, software 10 // distributed under the License is distributed on an "AS IS" BASIS, 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 // See the License for the specific language governing permissions and 13 // limitations under the License. 14 15 // Package cue is the main API for CUE evaluation. 16 // 17 // [Value] is the main type that represents CUE evaluations. 18 // Values are created with a [cuelang.org/go/cue/cuecontext.Context]. 19 // Only values created from the same Context can be involved in the same operation. 20 // Values created from the same Context are not safe for concurrent use, 21 // which we intend to change in the future. 22 // 23 // [Context] defines the set of active packages, the translations of field 24 // names to unique codes, as well as the set of builtins. 25 // Use [cuelang.org/go/cue/cuecontext.New] to create a new context. 26 // 27 // While a context can be used to build values, note that loading a module and its 28 // dependencies should be done with the [cuelang.org/go/cue/load] package. 29 // 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 40 // go or cue fix solution to automatically rewrite code using the new API. 41 package cue