cue icon indicating copy to clipboard operation
cue copied to clipboard

cue: add LanguageVersion method

Open rogpeppe opened this issue 1 year ago • 0 comments

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()
}

rogpeppe avatar Jun 26 '24 10:06 rogpeppe