version

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package version provides version information for the compiled binary, and an HTTP handler to serve the version information via an HTTP request.

Index

Constants

This section is empty.

Variables

View Source
var BuildDate string

BuildDate is the date when the binary was built

View Source
var GitCommit string

GitCommit is the commit hash when the binary was built

View Source
var Version string

Version is the version of the compiled software

Functions

func VersionHandler

func VersionHandler(w http.ResponseWriter, req *http.Request)

VersionHandler returns the version info

Types

type Info

type Info struct {
	// Version is the version of the FSM Controller.
	Version string `json:"version,omitempty"`

	// GitCommit is the git commit hash of the FSM Controller.
	GitCommit string `json:"git_commit,omitempty"`

	// BuildDate is the build date of the FSM Controller.
	BuildDate string `json:"build_date,omitempty"`
}

Info is a struct helpful for JSON serialization of the FSM Controller version information.

func GetInfo

func GetInfo() Info

GetInfo returns the version info

Jump to

Keyboard shortcuts

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