// NewArgs return a *Args
761180
func NewArgs(c *http.Client) *Args {
	if c == nil {
		c = DefaultClient
	}
	if c.Jar == nil {
		options := cookiejar.Options{
			PublicSuffixList: publicsuffix.List,
		}
		jar, _ := cookiejar.New(&options)
		c.Jar = jar
	}
	headers := map[string]string{}
	for k, v := range DefaultHeaders {
		headers[k] = v
	}

	return &Args{
		Client:    c,
		Headers:   headers,
		Cookies:   nil,
		Data:      nil,
		Params:    nil,
		Files:     nil,
		Json:      nil,
		Proxy:     "",
		BasicAuth: BasicAuth{},
		Body:      nil,
		Hooks:     []Hook{},
	}
}
658352
func (p *StringParam) Args() []string {
	return []string{fmt.Sprintf("--%v", p.CLIName()), p.String()}
}
270993
func NewNavigateArgs(url string) *NavigateArgs {
	args := new(NavigateArgs)
	args.URL = url
	return args
}
1335121
func mkArgs(paths []string) string {
	escaped := make([]string, len(paths))
	for i, s := range paths {
		escaped[i] = quotePath(realRel(s))
	}
	return strings.Join(escaped, " ")
}
1056991
func NewMakeSnapshotArgs(layerID LayerID) *MakeSnapshotArgs {
	args := new(MakeSnapshotArgs)
	args.LayerID = layerID
	return args
}
948195
func NewArg(logLevel int, pprof bool) Arg {
	return Arg{
		LogLevel:            log.Level(logLevel),
		PingTimeoutDuration: PingTimeoutDurationDefault,
		Pprof:               pprof,
	}
}
1225618
func addArgs(r AddRequest) redis.Args {
	args := redis.Args{r.Job.Queue, r.Job.Data, int(r.Timeout / time.Millisecond)}

	if r.Replicate > 0 {
		args = args.Add("REPLICATE", r.Replicate)
	}

	if r.Delay > 0 {
		args = args.Add("DELAY", int64(r.Delay.Seconds()))
	}

	if r.Retry > 0 {
		args = args.Add("RETRY", int64(r.Retry.Seconds()))
	}

	if r.TTL > 0 {
		args = args.Add("TTL", int64(r.TTL.Seconds()))
	}

	if r.Maxlen > 0 {
		args = args.Add("MAXLEN", r.Maxlen)
	}

	if r.Async {
		args = args.Add("ASYNC")
	}
	return args
}
843678
func (s *Server) args() ([]string, error) {
	// Get the port.
	if s.Port <= 0 {
		s.Port = DefaultServerPort
	}
	portArg := strconv.FormatInt(int64(s.Port), 10)

	// Create the args slice.
	args := []string{}

	switch s.Network {
	default:
		return nil, fmt.Errorf("unrecognized network type: %s", s.Network)
	case "udp":
		args = append(args, "-u", portArg)
	case "tcp":
		args = append(args, "-t", portArg)
	}

	return args, nil
}
105829
func NewCreateTargetArgs(url string) *CreateTargetArgs {
	args := new(CreateTargetArgs)
	args.URL = url
	return args
}
116854
func (c *Command) Args() []*Arg {
	ret := make([]*Arg, len(c.args))
	copy(ret, c.args)

	return ret
}
1127080
func RunArgs(flags Flagger, main interface{}, args []string) error {
	err := Flags(flags, main)
	if err != nil {
		return fmt.Errorf("calling Flags: %v", err)
	}
	err = flags.Parse(args)
	if err != nil {
		return fmt.Errorf("parsing flags: %v", err)
	}

	if main, ok := main.(Runner); ok {
		return main.Run()
	}
	return fmt.Errorf("called 'Run' with something which doesn't implement the 'Run() error' method.")
}
952200
func (h *multiHandler) Args() bool {
	for _, handler := range h.handlers {
		if handler.Args() {
			return true
		}
	}
	return false
}
617047
func (c *Config) Args() []string {
	args := []string{}
	for _, p := range c.Params {
		args = append(args, p.Args()...)
	}
	return args
}
261186
func NewGetAttributesArgs(nodeID NodeID) *GetAttributesArgs {
	args := new(GetAttributesArgs)
	args.NodeID = nodeID
	return args
}
1070778
func NewPaperDocCreateArgs(ImportFormat *ImportFormat) *PaperDocCreateArgs {
	s := new(PaperDocCreateArgs)
	s.ImportFormat = ImportFormat
	return s
}
118752
func (o *Application) SetArgs(v []string) *Application {
	if o.Args = v; o.Args == nil {
		o.nullFields = append(o.nullFields, "Args")
	}
	return o
}
370631
func NoArgs(cmd *cobra.Command, args []string) error {
	if len(args) == 0 {
		return nil
	}

	if cmd.HasSubCommands() {
		return errors.Errorf("\n" + strings.TrimRight(cmd.UsageString(), "\n"))
	}

	return errors.Errorf(
		"\"%s\" accepts no argument(s).\nSee '%s --help'.\n\nUsage:  %s\n\n%s",
		cmd.CommandPath(),
		cmd.CommandPath(),
		cmd.UseLine(),
		cmd.Short,
	)
}