Documentation ¶ Index ¶ type Body type BodyType type Field type Header type Input func ParseArgs(args []string, stdin io.Reader, options *Options) (*Input, error) type Method type Options type UsageError func (e *UsageError) Error() string Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Body ¶ type Body struct { BodyType BodyType Fields []Field RawJSONFields []Field // used only when BodyType == JSONBody Files []Field // used only when BodyType == FormBody Raw []byte // used only when BodyType == RawBody } type BodyType ¶ type BodyType int const ( EmptyBody BodyType = iota JSONBody FormBody RawBody ) type Field ¶ type Field struct { Name string Value string IsFile bool } type Header ¶ type Header struct { Fields []Field } type Input ¶ type Input struct { Method Method URL *url.URL Parameters []Field Header Header Body Body } func ParseArgs ¶ func ParseArgs(args []string, stdin io.Reader, options *Options) (*Input, error) type Method ¶ type Method string type Options ¶ type Options struct { JSON bool Form bool ReadStdin bool } type UsageError ¶ type UsageError string func (*UsageError) Error ¶ func (e *UsageError) Error() string Source Files ¶ View all Source files args.go input.go options.go Click to show internal directories. Click to hide internal directories.