From b1cf0985e27c0bcb6a1005ef9dd59e496ff05368 Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Sat, 26 Nov 2022 09:01:52 -0500 Subject: add `version` package. --- fern.go | 5 ++--- version/version.go | 6 ++++++ 2 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 version/version.go diff --git a/fern.go b/fern.go index 3f279bb..ea92311 100644 --- a/fern.go +++ b/fern.go @@ -51,10 +51,9 @@ import ( "ricketyspace.net/fern/config" "ricketyspace.net/fern/db" "ricketyspace.net/fern/state" + "ricketyspace.net/fern/version" ) -const version = "0.5.0.dev" - var fConf *config.FernConfig var pState *state.ProcessState @@ -87,7 +86,7 @@ func init() { flag.Parse() if *vFlag { - fmt.Printf("%s\n", version) + fmt.Printf("%s\n", version.Version) os.Exit(0) } if !*rFlag { diff --git a/version/version.go b/version/version.go new file mode 100644 index 0000000..897684b --- /dev/null +++ b/version/version.go @@ -0,0 +1,6 @@ +// SPDX-License-Identifier: ISC +// Copyright © 2022 siddharth + +package version + +const Version = "0.5.0.dev" -- cgit v1.2.3