Add version flag

go 1.18 embeds vcs info into binaries by default [1] allowing us to provide a
rudimentary version cmd in just a few lines. (version) vcs tags are not
embedded for now - just the commit hash should be good enough for now though.

[1] https://tip.golang.org/doc/go1.18
This commit is contained in:
Niklas Fasching 2022-03-27 01:16:01 +01:00
parent fa13957511
commit 7344ea2e86
2 changed files with 20 additions and 1 deletions

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/niklasfasching/go-org
go 1.17
go 1.18
require (
github.com/alecthomas/chroma v0.10.0