cue
cue copied to clipboard
cue: add LanguageVersion method
Currently there is no way in the public API to obtain access to the current
language version as defined in cueversion.LanguageVersion.
When users of the Go API are wanting to create a module.cue version
manually that corresponds to the current language version, that would be useful.
Proposed API:
package cue
import "cuelang.org/go/internal/cueversion"
// LanguageVersion returns the CUE language version. This determines the latest
// version of CUE that is accepted by the current CUE evaluator.
func LanguageVersion() string {
return cueversion.LanguageVersion()
}