go-mod-version

command module
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2026 License: MIT Imports: 5 Imported by: 0

README

go-mod-version

A simple CLI tool that prints the current Go module path along with the latest Git commit hash.

Output Format

<module-path>@<commit-hash>

Example:

github.com/st-1dev/go-mod-version@a1b2c3d4e5f6...

Installation

go install github.com/st-1dev/go-mod-version@latest

Usage

Run the tool from the root of a Go project with a Git repository:

go-mod-version

The tool reads go.mod to determine the module path and uses the local .git history to obtain the latest commit hash.

Build

This project uses Mage as a build tool.

# Build the binary
mage build

# Format the source code
mage format

Requirements

  • Go 1.26+
  • Git repository with at least one commit
  • go.mod file in the current directory

License

MIT

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