Categorygithub.com/neaas/go-version
repositorypackage
0.1.1
Repository: https://github.com/neaas/go-version.git
Documentation: pkg.go.dev

# README

GoVersion    GitHub release (latest SemVer)  GitHub Workflow Status

Go Reference

A (very) simple go package for handling semver compliant application versions.


Features

  • Immutable application version, set via linker flags.
  • Values from runtime/debug available.
  • Check for updates using public GitHub release/tag information.

Usage

Somewhere in your application, be sure that this package is imported:

import (
  _ "github.com/neaas/go-version"
)

Configuration

Set each configuration value using the linker flags as described below:

go build -ldflags "-X github.com/neaas/go-version.VARIABLE=VALUE" .
VariableDescriptionDefault Value
versionThe semver compliant version of the application being built.v0.0.0+unversioned
repositoryOwnerThe owner of the GitHub repository for the application.neaas
repositoryNameThe name of the application's GitHub repository.go-version
versionTypeThe method in which versions are defined for the repository
(release, tag, none)
tag