add version

This commit is contained in:
blek 2023-11-03 03:01:49 +10:00
parent ab3d5c767a
commit c76e429f8b
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,10 @@ import "net/textproto"
import "github.com/alecthomas/kong"
var (
version string
)
var Args struct {
Upload struct {
Filename string `optional:"" short:"n" help:"A short name by which the file can be accessed"`
@ -100,7 +104,9 @@ func upload(args *kong.Context) {
}
func main() {
args := kong.Parse(&Args)
version = "1.0.0"
args := kong.Parse(&Args, kong.Description(fmt.Sprintf("The blek! File CLI %s", version)))
switch args.Command() {
case "upload <file> <instance>":