1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-16 00:04:40 +00:00

Factor each commmand into its own package

This commit is contained in:
Nick Craig-Wood
2016-08-05 17:12:27 +01:00
parent 0a7b34eefc
commit e27b91ffb8
25 changed files with 855 additions and 558 deletions

19
cmd/version/version.go Normal file
View File

@@ -0,0 +1,19 @@
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()
},
}