示例#1
0
文件: console.go 项目: pquerna/hurl
func ConsoleRun(ui common.UI, cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		common.ConsoleErr(cmd, fmt.Sprintf("Error: Expected 1 URL, got: %s", args))
		return
	}

	g_config.Url = args[0]

	ui.ConfigSet(&g_config)

	common.ConsoleRun(workers.Run, "http", ui, cmd, args)
}
示例#2
0
文件: console.go 项目: pquerna/hurl
func ConsoleRun(ui common.UI, cmd *cobra.Command, args []string) {
	if len(args) != 1 {
		common.ConsoleErr(cmd, fmt.Sprintf("Error: Missing mode: %s", args))
		return
	}

	// https://auth.api.rackspacecloud.com/v1.0

	g_config.Mode = args[0]

	ui.ConfigSet(&g_config)

	common.ConsoleRun(workers.Run, "swift", ui, cmd, args)
}