Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions internal/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ import (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "readium",
Short: "Utilities for Readium Web Publications",
Version: Version + " (go-toolkit " + version.Version + ")",
Use: "readium",
Short: "Utilities for Readium Web Publications",
}

// Execute adds all child commands to the root command and sets flags appropriately.
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute() {
if rootCmd.Version == "" {
rootCmd.Version = Version + " (go-toolkit " + version.Version + ")"
}
err := rootCmd.Execute()
if err != nil {
// Error is already printed to stderr by Cobra.
Expand Down