Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ PreRun: func(cmd *cobra.Command, args []string) { if askVersion { fmt.Println(version) os.Exit(0) } if len(args) > 0 && args[0] == "help" { fmt.Println(usageDetail()) os.Exit(1) } }, Run: func(cmd *cobra.Command, args []string) { pa, err := parsePositionalArguments(args) if err != nil { fmt.Println(usageShort()) fmt.Println(errorString(err)) os.Exit(1) } if !isatty.IsTerminal(os.Stdin.Fd()) { if params, err = ioutil.ReadAll(os.Stdin); err != nil { exitWithError(err) } } httpMethod = pa.httpMethod requestItems = pa.requestItems uri = pa.uri dumpConfig := &DumpConfig{ verbose: verbose, onlyBody: onlyBody, } initConfig() c := NewClient(accessKeyID, accessKeySecret, time.Duration(timeout)*time.Second) resp, err := c.doRequest( httpMethod, uri, params, noAuth, dumpConfig, ) if err != nil { exitWithError(err) } defer resp.Body.Close() }, }
Functions ¶
Types ¶
type DumpConfig ¶
type DumpConfig struct {
// contains filtered or unexported fields
}
DumpConfig config for dump http request and response
type PositionalArgument ¶
type PositionalArgument struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.