mirror of
https://github.com/rclone/rclone.git
synced 2024-11-27 02:45:16 +01:00
20 lines
337 B
Go
20 lines
337 B
Go
|
package version
|
||
|
|
||
|
import (
|
||
|
"github.com/ncw/rclone/cmd"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
cmd.Root.AddCommand(versionCmd)
|
||
|
}
|
||
|
|
||
|
var versionCmd = &cobra.Command{
|
||
|
Use: "version",
|
||
|
Short: `Show the version number.`,
|
||
|
Run: func(command *cobra.Command, args []string) {
|
||
|
cmd.CheckArgs(0, 0, command, args)
|
||
|
cmd.ShowVersion()
|
||
|
},
|
||
|
}
|