gitcalver

package
v0.20260415.4 Latest Latest
Warning

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

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

Documentation

Overview

Package gitcalver computes calendar-based version strings from git history.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Main

func Main(args []string, stdout, stderr io.Writer) int

Main is the entry point called from cmd/gitcalver. Returns an exit code.

func Run

func Run(opts *Options) (string, error)

Run executes gitcalver and returns the output string.

Types

type ExitError

type ExitError struct {
	Code    int
	Message string
}

ExitError represents an error with a specific exit code.

func (*ExitError) Error

func (e *ExitError) Error() string

type Options

type Options struct {
	Dir         string
	Target      string // git revision or version string
	Prefix      string
	Dirty       string // non-empty enables dirty mode with this suffix; empty refuses dirty
	NoDirtyHash bool
	Branch      string
	Short       bool
}

Options configures a gitcalver invocation.

Jump to

Keyboard shortcuts

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