Files
plainleaf/cli/version.go
T
Zef Hemel b5bdab5d1a CLI work
* Replaced initial node.js prototype of CLI with proper Go
  implementation
* Added code signing for CLI + server binaries for macOS
2026-03-29 16:48:39 +02:00

21 lines
320 B
Go

package cli
import (
"fmt"
"github.com/spf13/cobra"
)
func VersionCommand(version string) *cobra.Command {
return &cobra.Command{
Use: "version",
Short: "Print the CLI version",
Run: func(cmd *cobra.Command, args []string) {
if version == "" {
version = "dev"
}
fmt.Println(version)
},
}
}