// Bind a value from a Placeholder slice.
335629
func (ph Placeholders) Bind(name string, dst interface{}) error {
	v := ph.Value(name)
	if v == nil {
		return errors.New("Placeholder with name " + name + " not found")
	}

	return ConvertValue(v, dst)
}
742431
func (o *FindTodosParams) bindSince(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: false
	// AllowEmptyValue: false
	if raw == "" { // empty values pass all other validations
		return nil
	}

	value, err := swag.ConvertInt64(raw)
	if err != nil {
		return errors.InvalidType("since", "query", "int64", raw)
	}
	o.Since = &value

	return nil
}
289645
func (opts BeeOptions) Bind(name string, dst interface{}) error {
	v := opts.Value(name)
	if v == nil {
		return errors.New("Option with name " + name + " not found")
	}

	return ConvertValue(v, dst)
}
544596
func (s *Statement) Bindings() []string {
	var bs []string
	for k := range s.BindingsMap() {
		bs = append(bs, k)
	}
	return bs
}
1224533
func (b *binder) Bind(binding *v1.Binding) error {
	klog.V(3).Infof("Attempting to bind %v to %v", binding.Name, binding.Target.Name)
	return b.Client.CoreV1().Pods(binding.Namespace).Bind(binding)
}
1282429
func Binding(dn, pwd string) Option {
	return func(r *Realm) {
		r.bindDN = dn
		r.bindPwd = pwd
	}
}
1339056
func PlaceholderString(n *ast.MsgNode) string {
	var buf bytes.Buffer
	writeFingerprint(&buf, n, true)
	return buf.String()
}
701447
func (p *parser) parseBind(binds *ast.LocalBinds) error {
	varID, err := p.popExpect(tokenIdentifier)
	if err != nil {
		return err
	}
	for _, b := range *binds {
		if b.Variable == ast.Identifier(varID.data) {
			return MakeStaticError(fmt.Sprintf("Duplicate local var: %v", varID.data), varID.loc)
		}
	}

	var fun *ast.Function
	if p.peek().kind == tokenParenL {
		p.pop()
		params, gotComma, err := p.parseParameters("function parameter")
		if err != nil {
			return err
		}
		fun = &ast.Function{
			Parameters:    *params,
			TrailingComma: gotComma,
		}
	}

	_, err = p.popExpectOp("=")
	if err != nil {
		return err
	}
	body, err := p.parse(maxPrecedence)
	if err != nil {
		return err
	}

	if fun != nil {
		fun.NodeBase = ast.NewNodeBaseLoc(locFromTokenAST(varID, body))
		fun.Body = body
		*binds = append(*binds, ast.LocalBind{
			Variable: ast.Identifier(varID.data),
			Body:     body,
			Fun:      fun,
		})
	} else {
		*binds = append(*binds, ast.LocalBind{
			Variable: ast.Identifier(varID.data),
			Body:     body,
		})
	}

	return nil
}
966083
func (p *Params) Bind(dest interface{}, name string) {
	value := reflect.ValueOf(dest)
	if value.Kind() != reflect.Ptr {
		paramsLogger.Panic("Bind: revel/params: non-pointer passed to Bind: " + name)
	}
	value = value.Elem()
	if !value.CanSet() {
		paramsLogger.Panic("Bind: revel/params: non-settable variable passed to Bind: " + name)
	}

	// Remove the json from the Params, this will stop the binder from attempting
	// to use the json data to populate the destination interface. We do not want
	// to do this on a named bind directly against the param, it is ok to happen when
	// the action is invoked.
	jsonData := p.JSON
	p.JSON = nil
	value.Set(Bind(p, name, value.Type()))
	p.JSON = jsonData
}
716248
func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
	log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to
	be deprecated, please check issue #662 and either use MustBindWith() if you
	want HTTP 400 to be automatically returned if any error occur, or use
	ShouldBindWith() if you need to manage the error.`)
	return c.MustBindWith(obj, b)
}
1357995
func replacePlaceholders(placeholders []string, params Params) ([]interface{}, error) {
	if len(placeholders) == 0 {
		return nil, nil
	}

	var result []interface{}
	for _, name := range placeholders {
		if value, ok := params[name]; ok {
			result = append(result, value)
		} else {
			return nil, errors.New("Named parameter not found: " + name)
		}
	}
	return result, nil
}
738806
func (ph *Placeholders) SetValue(name string, _type string, value interface{}) {
	if ph.Value(name) == nil {
		p := Placeholder{
			Name:  name,
			Type:  _type,
			Value: value,
		}
		*ph = append(*ph, p)
	} else {
		for i := 0; i < len(*ph); i++ {
			if (*ph)[i].Name == name {
				(*ph)[i].Type = _type
				(*ph)[i].Value = value
			}
		}
	}
}
874780
func (rdb RethinkDB) bound(changeID, filterName string) ([]interface{}, string) {
	createdAtTerm := gorethink.DB(rdb.dbName).Table(Change{}.TableName()).Get(changeID).Field("created_at")
	if filterName != "" {
		return []interface{}{filterName, createdAtTerm, changeID}, "rdb_gun_created_at_id"
	}
	return []interface{}{createdAtTerm, changeID}, "rdb_created_at_id"
}
1357241
func (s *Socket) Bind(endpoint string) (err error) {
	cstr := C.CString(endpoint)
	defer C.free(unsafe.Pointer(cstr))
	r := C.zmq_bind(s.sock, cstr)
	if r == -1 {
		err = zmqerr()
	}
	return
}
1233676
func (o *PostIPAMParams) bindOwner(rawData []string, hasKey bool, formats strfmt.Registry) error {
	var raw string
	if len(rawData) > 0 {
		raw = rawData[len(rawData)-1]
	}

	// Required: false
	// AllowEmptyValue: false
	if raw == "" { // empty values pass all other validations
		return nil
	}

	o.Owner = &raw

	return nil
}
271538
func (c *Context) BindJSON(obj interface{}) error {
	return c.MustBindWith(obj, binding.JSON)
}
226307
func (m *MockPodInterface) Bind(arg0 *v1.Binding) error {
	ret := m.ctrl.Call(m, "Bind", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}