version

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package version resolves the sfw-mcp binary version and its linked semantic_firewall engine version at runtime from the embedded Go build info. `go install ...@v0.1.2` populates debug.ReadBuildInfo().Main.Version with the binary's own tag and debug.ReadBuildInfo().Deps with the resolved dependency versions; a local `go run` or `go build` without a tag leaves both as "(devel)".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build() string

Build returns the version of the sfw-mcp binary itself.

func Engine

func Engine() string

Engine returns the version of the semantic_firewall engine library linked into this binary. We deliberately do NOT call sfw/pkg/version.EngineVersion here: that helper reports info.Main.Version, which is the sfw-mcp tag whenever sfw-mcp is the main module -- giving downstream operators a misleading "Engine: <mcp-tag>" reading. Walking info.Deps for the engine path returns the real linked dependency.

func String

func String() string

String formats both versions for the `sfw-mcp version` subcommand. The two-line layout is chosen to match v3's `sfw version` output so muscle memory carries over.

Types

This section is empty.

Jump to

Keyboard shortcuts

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