gocuelang.org/go/internal/cueversion Index | Files

package cueversion

import "cuelang.org/go/internal/cueversion"

Package cueversion provides access to the version of the cuelang.org/go module.

Index

Functions

func LanguageVersion

func LanguageVersion() string

LanguageVersion returns the CUE language version. This determines the latest version of CUE that is accepted by the module.

func ModuleVersion

func ModuleVersion() string

ModuleVersion returns the version of the cuelang.org/go module as best as can reasonably be determined. This is provided for informational and debugging purposes and should not be used to predicate version-specific behavior.

func NewTransport

func NewTransport(clientType string, next http.RoundTripper) http.RoundTripper

NewTransport returns an http.RoundTripper implementation that wraps next and adds a "User-Agent" header to every HTTP request containing the result of UserAgent(clientType). If next is nil, http.DefaultTransport will be used.

func UserAgent

func UserAgent(clientType string) string

UserAgent returns a string suitable for adding as the User-Agent header in an HTTP agent. The clientType argument specifies how CUE is being used: if this is empty it defaults to "cuelang.org/go".

Example:

Cue/v0.8.0 (cuelang.org/go; vxXXX) Go/go1.22.0 (linux/amd64)

Source Files

transport.go version.go

Version
v0.12.0 (latest)
Published
Jan 30, 2025
Platform
linux/amd64
Imports
9 packages
Last checked
8 hours ago

Tools for package owners.