meta

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: LGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package meta handles the metadata generated through the go builder using ldflags.

Example (Digits)
fmt.Println(digits("v1.0 (init release)"))
Output:

1.0

Index

Examples

Constants

View Source
const (
	// Alpha Greek character.
	Alpha = "α"
	// Beta Greek character.
	Beta = "β"
	// GoBuild version when no ldflags are in use.
	GoBuild = "0.0.0"
	// Placeholder string when no ldflags are in use.
	Placeholder = "unset"
	// Bin is the binary filename of this program.
	Bin = "retrotxt"
	// Dir is the sub-directory name used for configuration and temporary paths.
	Dir = "retrotxt"
	// Name of this program.
	Name = "RetroTxtGo"
	// URL for this program's website.
	URL = "https://retrotxt.com/go"
	// WebPort is the internal server HTTP port.
	WebPort uint = 8086
)

Variables

View Source
var App = Release{} //nolint:gochecknoglobals

App contains the version release and build metadata.

Functions

func IsGoBuild added in v0.0.33

func IsGoBuild() bool

IsGoBuild returns true if this version of RetroTxt was manually built.

func Print

func Print() string

Print the release version string.

Types

type Release

type Release struct {
	// Version of this program.
	Version string
	// GitHub commit checksum.
	Commit string
	// Date in the RFC3339 format.
	Date string
	// Built by name (goreleaser).
	BuiltBy string
}

Release metadata.

type Version

type Version struct {
	Major int
	Minor int
	Patch int
}

Version using semantic syntax values.

func Semantic

func Semantic(ver string) Version

Semantic breaks down a semantic version string into major, minor and patch integers.

func (Version) String

func (v Version) String() string

func (Version) Valid

func (v Version) Valid() bool

Valid checks the version syntax.

Jump to

Keyboard shortcuts

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