version

package
v0.0.1-rc3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package version exposes build-time metadata. Values are injected via -ldflags '-X github.com/JoshuaMart/websec0/internal/version.<Var>=<value>'. See Makefile for the canonical invocation.

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "dev"
	Commit    = "none"
	BuildDate = "unknown"
)

Build-time injectables. Defaults make `go run` ergonomic without ldflags.

Functions

This section is empty.

Types

type Info

type Info struct {
	Version   string `json:"version"`
	Commit    string `json:"commit"`
	BuildDate string `json:"build_date"`
}

Info aggregates the build metadata for JSON serialization (e.g. GET /api/v1/version).

func Get

func Get() Info

Get returns a snapshot of the current build metadata.

Jump to

Keyboard shortcuts

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