repoInfoDump

package module
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 4 Imported by: 0

README

repoInfoDump

This tools helps you quickly obtain a string containing the repo status (commit hash, time) at the time of build of your binary.

Usage

fmt.println(repoInfoDump.GetString())

Output example:

repoInfoDump v0.1.3 commit: cf5013a (2024-03-28T11:53:42Z) (REPO MODIFIED)

Other customized usages are possible.

TODO

  • Improve documentation

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = ""

Version can be set before calling these methods,

or it can be set with build time parameter, e.g.
-ldflags "-X github.com/EdoaLive/repoInfoDump.Version=v0.1.3"

Functions

func GetString

func GetString() string

Types

type Values

type Values struct {
	Name     string
	Commit   string
	Time     string
	Modified bool
}

func New

func New() (Values, error)

func (Values) String

func (v Values) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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