version

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package version provides build version information.

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the semantic version of the build.
	Version = "dev"

	// GitCommit is the git commit hash of the build.
	GitCommit = "unknown"

	// BuildTime is the time the build was created.
	BuildTime = "unknown"
)

These variables are set at build time via ldflags.

Functions

func Clean added in v0.3.0

func Clean(v string) string

Clean strips a leading "v" prefix from a version string.

func IsNewer added in v0.3.0

func IsNewer(local, remote string) bool

IsNewer returns true if remote is a newer semver than local. Handles "dev" and "unknown" gracefully — local "dev" always considers remote newer.

func UserAgent added in v0.5.0

func UserAgent() string

UserAgent returns the User-Agent string for outbound HTTP requests.

Types

type Transport added in v0.5.0

type Transport struct {
	Base http.RoundTripper
}

Transport wraps an http.RoundTripper to inject the panda User-Agent header.

func (*Transport) RoundTrip added in v0.5.0

func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip implements http.RoundTripper.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL