Files
CBZOptimizer/cmd/version_command.go
2024-08-27 19:43:13 -04:00

22 lines
453 B
Go

package cmd
import (
"fmt"
"github.com/belphemur/CBZOptimizer/meta"
"github.com/spf13/cobra"
)
func init() {
command := &cobra.Command{
Use: "version",
Short: "Print the version of the application",
Long: "Print the version of the application",
Run: VersionCommand,
}
AddCommand(command)
}
func VersionCommand(_ *cobra.Command, _ []string) {
fmt.Printf("CBZOptimizer %s [%s] built [%s]\n", meta.Version, meta.Commit, meta.Date)
}