github.com/ncw/rclone@v1.48.1-0.20190724201158-a35aa1360e3e/cmd/authorize/authorize.go (about) 1 package authorize 2 3 import ( 4 "github.com/ncw/rclone/cmd" 5 "github.com/ncw/rclone/fs/config" 6 "github.com/spf13/cobra" 7 ) 8 9 func init() { 10 cmd.Root.AddCommand(commandDefintion) 11 } 12 13 var commandDefintion = &cobra.Command{ 14 Use: "authorize", 15 Short: `Remote authorization.`, 16 Long: ` 17 Remote authorization. Used to authorize a remote or headless 18 rclone from a machine with a browser - use as instructed by 19 rclone config.`, 20 Run: func(command *cobra.Command, args []string) { 21 cmd.CheckArgs(1, 3, command, args) 22 config.Authorize(args) 23 }, 24 }