in cmd/version.go [24:43]
func versionCmd() *cobra.Command {
// Create version command for cobra root command
var versionCmd = &cobra.Command{
Use: "version",
Short: "Show version",
Long: `Show the version of obom`,
Run: func(cmd *cobra.Command, args []string) {
if version.Version == "" {
fmt.Println("Error getting version")
return
} else {
fmt.Printf("Version: %s\n", version.Version)
fmt.Printf("Git Commit: %s\n", version.GitCommit)
fmt.Printf("Git Tree State: %s\n", version.GitTreeState)
}
},
}
return versionCmd
}