// Set from the non-compact form in BEP 3.
768277
func (p *Peer) fromDictInterface(d map[string]interface{}) {
	p.IP = net.ParseIP(d["ip"].(string))
	if _, ok := d["peer id"]; ok {
		p.ID = []byte(d["peer id"].(string))
	}
	p.Port = int(d["port"].(int64))
}
297233
func (m *ColonSeparatedMultimapStringString) Set(value string) error {
	if m.Multimap == nil {
		return fmt.Errorf("no target (nil pointer to map[string][]string)")
	}
	if !m.initialized || *m.Multimap == nil {
		// clear default values, or allocate if no existing map
		*m.Multimap = make(map[string][]string)
		m.initialized = true
	}
	for _, pair := range strings.Split(value, ",") {
		if len(pair) == 0 {
			continue
		}
		kv := strings.SplitN(pair, ":", 2)
		if len(kv) != 2 {
			return fmt.Errorf("malformed pair, expect string:string")
		}
		k := strings.TrimSpace(kv[0])
		v := strings.TrimSpace(kv[1])
		(*m.Multimap)[k] = append((*m.Multimap)[k], v)
	}
	return nil
}
184286
func (this *Response) Set(f string, v string) {
	if v == "" {
		this.RemoveHeader(f)
	} else {
		this.SetHeader(f, v)
	}
}
1241046
func (f *PkgFilter) Set(i uint16) {
	byt := i / 8
	bit := i % 8

	// Set the i-th bit in the filter.
	// TODO(conner): ignore if > count to prevent panic?
	f.filter[byt] |= byte(1 << (7 - bit))
}
1290173
func (b *Bound) Set(west, east, south, north float64) {
	b.sw[0] = west
	b.sw[1] = south

	b.ne[0] = east
	b.ne[1] = north
}
538931
func (me *Int) Set(s string) {
	v, _ := strconv.ParseInt(s, 0, 32)
	*me = Int(v)
}
498132
func (n *ACIdentifier) Set(s string) error {
	nn, err := NewACIdentifier(s)
	if err == nil {
		*n = *nn
	}
	return err
}
270207
func (b *Buckets) Set(str string) error {
	fargs := func(c rune) bool {
		return c == ',' || c == ';'
	}
	// get function
	slice := strings.FieldsFunc(str, fargs)
	for _, bucket := range slice {
		bu, err := strconv.ParseFloat(bucket, 64)
		if err != nil {
			return err
		}
		*b = append(*b, bu)
	}
	return nil
}
366891
func (s *Document) SetS3Object(v *S3Object) *Document {
	s.S3Object = v
	return s
}
556348
func (f *commaListFlag) Set(s string) error {
	if f == nil {
		return errors.Reason("commaListFlag pointer is nil").Err()
	}
	*f = splitCommaList(s)
	return nil
}
1128760
func (enum *GenericEnum) Set(symbol string) {
	if index, exists := enum.symbolsToIndex[symbol]; !exists {
		panic("Unknown enum symbol")
	} else {
		enum.index = index
	}
}
889406
func (e *G2) Set(a *G2) *G2 {
	if e.p == nil {
		e.p = &twistPoint{}
	}
	e.p.Set(a.p)
	return e
}
914706
func (s *Location) SetS3(v []*CodeGenNodeArg) *Location {
	s.S3 = v
	return s
}
1219265
func (s *Image) SetS3Object(v *S3Object) *Image {
	s.S3Object = v
	return s
}
482277
func (i *Uint64Opt) Set(s string) error {
	v, err := strconv.ParseUint(s, 0, 64)
	i.value = &v
	return err
}
576002
func (c *Client) Set(key, val string, flags, exp uint32, ocas uint64) (cas uint64, err error) {
	// Variants: [R] Set [Q]
	return c.setGeneric(opSet, key, val, ocas, flags, exp)
}
1066866
func (tt *Type) Set(v string) error {
	return targetTypeEnum.FlagSet(tt, v)
}