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:
19
cmd/version/version.go
Normal file
19
cmd/version/version.go
Normal 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()
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user