version

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version holds build-time version metadata injected via goreleaser ldflags (see .goreleaser.yaml and the Makefile) and derives values from it, such as the HTTP User-Agent sent on every API request for backend telemetry.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Commit

func Commit() string

Commit returns the build commit hash.

func Date

func Date() string

Date returns the build date.

func Set

func Set(v, c, d string)

Set records the build-time version info. Called once from main, before any HTTP client is constructed.

func UserAgent

func UserAgent() string

UserAgent returns the HTTP User-Agent header value, e.g. "wk-cli/1.2.3". The backend telemetry pipeline attributes requests to the CLI and its version via this header, mirroring the old workato-platform-cli's "workato-platform-cli/<version>" convention.

The token is "wk-cli", not the bare command name "wk": the nginx access-log field this lands in is analyzed/tokenized, so a 2-char token like "wk" shows up as a stray token in unrelated user-agents and collides. "wk-cli" filters cleanly as a phrase ("wk" then "cli" adjacent), and it matches the token the original beta builds already sent, keeping telemetry continuous.

func Version

func Version() string

Version returns the build version string (e.g. "1.2.3" or "dev").

Types

This section is empty.

Jump to

Keyboard shortcuts

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