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 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) Go/go1.22.0 (linux/amd64)

func Version

func Version() string

Version returns the version of the cuelang.org/go module as best as can reasonably be determined. The result is always a valid Go semver version.

Source Files

transport.go version.go

Version
v0.8.1
Published
Apr 3, 2024
Platform
windows/amd64
Imports
7 packages
Last checked
42 minutes ago

Tools for package owners.