2016-08-05 16:12:27 +00:00
|
|
|
package version
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/ncw/rclone/cmd"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
2018-03-17 11:36:30 +00:00
|
|
|
cmd.Root.AddCommand(commandDefinition)
|
2016-08-05 16:12:27 +00:00
|
|
|
}
|
|
|
|
|
2018-03-17 11:36:30 +00:00
|
|
|
var commandDefinition = &cobra.Command{
|
2016-08-05 16:12:27 +00:00
|
|
|
Use: "version",
|
|
|
|
Short: `Show the version number.`,
|
|
|
|
Run: func(command *cobra.Command, args []string) {
|
|
|
|
cmd.CheckArgs(0, 0, command, args)
|
|
|
|
cmd.ShowVersion()
|
|
|
|
},
|
|
|
|
}
|