git-version

command module
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2023 License: MIT Imports: 9 Imported by: 0

README

git-version

Generates a version.go file in function of the informations available in the git repository

To generate with "go generate" place the following line in your main package:

package main

//go:generate git-version

Generated "version.go" will contain constants with infomation from git

package main

const(
        gitCommit = "e1ed2c7b8b1d1af5c4213c87f7fe3a8062a5eeb8"
        gitShortCommit = "e1ed2c7"
        gitTag = "NA"
        gitBranch = "NA"
        gitStatus = "dirty"
)

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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