feat: nfctl(add version)

This commit is contained in:
loveuer
2024-12-26 19:51:31 -08:00
parent ad6b4fe7b6
commit 8235631d4f
6 changed files with 46 additions and 1 deletions

View File

@ -8,6 +8,7 @@ type _new struct {
type config struct {
Debug bool
DisableUpdate bool
Version bool
New _new
}

View File

@ -1,7 +1,13 @@
package opt
const Version = "v24.12.27-r01"
const Version = "v24.12.27-r02"
// const VersionURL = "https://github.com/loveuer/nf/nft/nfctl/internal/opt/version.go"
const VersionURL = "https://raw.githubusercontent.com/loveuer/nf/refs/heads/master/nft/nfctl/internal/opt/version.go"
const Banner = ` ___ __ __
___ / _/___/ /_/ /
/ _ \/ _/ __/ __/ /
/_//_/_/ \__/\__/_/
`

View File

@ -0,0 +1,10 @@
package opt
import (
"fmt"
"testing"
)
func TestBanner(t *testing.T) {
fmt.Printf("%s\nnfctl: %s\n\n", Banner, Version)
}