// RouteArg returns an argument value as a string or empty string
555161
func (ctx *Context) RouteArg(argName string) string {
	v, err := ctx.RouteArgErr(argName)
	if err != nil {
		return emptyString
	}
	return v
}
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
}
60451
func ArgsArg(r, o int) ArgSpec {
	return ArgSpec(C._go_MRB_ARGS_ARG(C.int(r), C.int(o)))
}
1193003
func (f *FlagSet) Arg(i int) string {
	if i < 0 || i >= len(f.args) {
		return ""
	}
	return f.args[i]
}
314933
func (po *PageOptions) Args() []string {
	return append(append([]string{}, po.pageOptions.Args()...), po.headerAndFooterOptions.Args()...)
}
1126853
func (p *ListParam) Args() []string {
	if len(p.values) == 0 {
		return []string{}
	}
	out := make([]string, 0, len(p.values))
	for _, v := range p.values {
		out = append(out, v.Args()...)
	}
	return out
}
77181
func (cmd *CLI) Arg(index int) values.Value {
	return cmd.Args()[index]
}
617047
func (c *Config) Args() []string {
	args := []string{}
	for _, p := range c.Params {
		args = append(args, p.Args()...)
	}
	return args
}
371301
func driverArgsToMap(args []driver.Value) (map[string]interface{}, error) {
	output := map[string]interface{}{}
	for _, arg := range args {
		argBytes, ok := arg.([]byte)
		if !ok {
			return nil, errors.New("You must pass only a gob encoded map to the Exec/Query args")
		}

		m, err := encoding.Unmarshal(argBytes)
		if err != nil {
			return nil, err
		}

		for k, v := range m.(map[string]interface{}) {
			output[k] = v
		}

	}

	return output, nil
}
645576
func (a *API) RouteTree() string {
	var routes string

	for _, resource := range a.Resources {
		routes = strings.Join([]string{routes, resource.RouteTree()}, "")
	}

	return routes
}
618964
func NewArgs(initialArgs ...KeyValuePair) Args {
	args := Args{fields: map[string]map[string]bool{}}
	for _, arg := range initialArgs {
		args.Add(arg.Key, arg.Value)
	}
	return args
}
907896
func (c *configCommand) handleArgs(args []string) error {
	// This must be setting values but let's make sure.
	var pairs, numArgs int
	numArgs = len(args)
	for _, a := range args {
		if strings.Contains(a, "=") {
			pairs++
		}
	}
	if pairs == numArgs {
		return c.parseSet(args)
	}
	if pairs == 0 {
		return errors.New("can only retrieve a single value, or all values")
	}
	return errors.New("cannot set and retrieve values simultaneously")
}
159624
func Arg(n int) string {
	if n >= 0 && n < len(CommandLine.args) {
		return CommandLine.args[n]
	}
	return ""
}
25316
func IntArg(c *caddy.Controller) (int, error) {
	args := c.RemainingArgs()
	if len(args) != 1 {
		return 0, c.ArgErr()
	}
	return strconv.Atoi(args[0])
}
900129
func Arg(key, value string) KeyValuePair {
	return KeyValuePair{Key: key, Value: value}
}
735972
func (c *configCommand) handleOneArg(arg string) error {
	// We may have a single config.yaml file
	_, err := os.Stat(arg)
	if err == nil || strings.Contains(arg, "=") {
		return c.parseSetKeys([]string{arg})
	}
	// If we are not setting a value, then we are retrieving one so we need to
	// make sure that we are not resetting because it is not valid to get and
	// reset simultaneously.
	if len(c.reset) > 0 {
		return errors.New("cannot set and retrieve model values simultaneously")
	}
	c.keys = []string{arg}
	c.action = c.getConfig
	return ParseCert(arg)
}
18537
func (cmd *Cmd) Arguments(args ...string) *Cmd {
	cmd.Cmd.Args = append(cmd.Cmd.Args[0:1], args...) //we need the first argument which is the command
	return cmd
}