Report the embedded release version
This commit is contained in:
17
internal/app/version.go
Normal file
17
internal/app/version.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/buildinfo"
|
||||
)
|
||||
|
||||
// Version prints the version embedded in the current Narratio binary.
|
||||
func Version(args []string, out io.Writer) error {
|
||||
if len(args) != 0 {
|
||||
return fmt.Errorf("version: unexpected arguments")
|
||||
}
|
||||
_, err := fmt.Fprintf(out, "narratio %s\n", buildinfo.Version)
|
||||
return err
|
||||
}
|
||||
Reference in New Issue
Block a user