// SetOption is the default Handler for Set_Option requests
483207
func (s *Service) SetOption(args []byte) ([]byte, error) {
	opts := bytes.SplitN(args, []byte{' '}, 2)
	key := string(opts[0])
	val := string(opts[1])

	if Trace {
		fmt.Fprintf(os.Stderr, "set option %q=%q\n", key, val)
	}

	switch key {
	case "broadcastIP": // TODO: const-ify
		if val == "1" {
			ip := s.PrimaryIP()
			if ip == "" {
				log.Printf("failed to find primary IP")
				return nil, nil
			}
			msg := fmt.Sprintf("info-set guestinfo.ip %s", ip)
			_, err := s.out.Request([]byte(msg))
			if err != nil {
				return nil, err
			}

			s.SendGuestInfo()
		}
	default:
		// TODO: handle other options...
	}

	return nil, nil
}
561161
func (c *Conn) SetConfigOption(option, value string) error {
	c_opt, c_val := C.CString(option), C.CString(value)
	defer C.free(unsafe.Pointer(c_opt))
	defer C.free(unsafe.Pointer(c_val))
	ret := C.rados_conf_set(c.cluster, c_opt, c_val)
	if ret < 0 {
		return RadosError(int(ret))
	} else {
		return nil
	}
}
482445
func (c *Configure) option(value interface{}, name string, def interface{}, description string, typ valueType) {
	opt := &option{
		name:        name,
		def:         def,
		description: description,
		typ:         typ,
		value:       value,
	}

	c.options[name] = opt
}
122359
func (s *AccessPoliciesStatus) SetOptions(v string) *AccessPoliciesStatus {
	s.Options = &v
	return s
}
1162097
func (s *Set) AddOption(o Option) {
	opt := o.(*option)
	for _, eopt := range s.options {
		if opt == eopt {
			return
		}
	}
	if opt.short != 0 {
		if oo, ok := s.shortOptions[opt.short]; ok {
			fmt.Fprintf(stderr, "%s: -%c already declared at %s\n", opt.where, opt.short, oo.where)
			exit(1)
		}
		s.shortOptions[opt.short] = opt
	}
	if opt.long != "" {
		if oo, ok := s.longOptions[opt.long]; ok {
			fmt.Fprintf(stderr, "%s: --%s already declared at %s\n", opt.where, opt.long, oo.where)
			exit(1)
		}
		s.longOptions[opt.long] = opt
	}
	s.options = append(s.options, opt)
}
682085
func (s *ScalingParametersStatus) SetOptions(v *ScalingParameters) *ScalingParametersStatus {
	s.Options = v
	return s
}
564228
func (module *BBAnalogModule) SetOptions(options map[string]interface{}) error {
	v := options["pins"]
	if v == nil {
		return fmt.Errorf("Module '%s' SetOptions() did not get 'pins' values", module.GetName())
	}

	module.definedPins = v.(BBAnalogModulePinDefMap)
	return nil
}
73718
func (module *BBPWMModule) SetOptions(options map[string]interface{}) error {
	v := options["pins"]
	if v == nil {
		return fmt.Errorf("Module '%s' SetOptions() did not get 'pins' values", module.GetName())
	}

	module.definedPins = v.(BBPWMModulePinDefMap)
	return nil
}
1304295
func (s *Subsection) AddOption(key string, value string) *Subsection {
	s.Options = s.Options.withAddedOption(key, value)
	return s
}
945511
func (spark *Sparkline) SetOption(key string, value string) {
	if spark.Data == nil {
		spark.Options = make(map[string]string)
	}
	spark.Options[key] = value
}
818365
func (s *EndpointBatchItem) SetOptOut(v string) *EndpointBatchItem {
	s.OptOut = &v
	return s
}
1234726
func (s *CopyOptionGroupOutput) SetOptionGroup(v *OptionGroup) *CopyOptionGroupOutput {
	s.OptionGroup = v
	return s
}
1078678
func (s *AnalysisSchemeStatus) SetOptions(v *AnalysisScheme) *AnalysisSchemeStatus {
	s.Options = v
	return s
}
556563
func (r *Request) ApplyOptions(opts ...Option) {
	for _, opt := range opts {
		opt(r)
	}
}
383975
func (c *conn) SetOption(option ConnOption, enable bool) error {
	o, ok := linuxOption(option)
	if !ok {
		// Return the typical Linux error for an unknown ConnOption.
		return os.NewSyscallError("setsockopt", unix.ENOPROTOOPT)
	}

	var v int
	if enable {
		v = 1
	}

	return os.NewSyscallError("setsockopt", c.s.SetSockoptInt(
		unix.SOL_NETLINK,
		o,
		v,
	))
}
1240340
func (s *OptionGroupOption) SetOptionGroupOptionSettings(v []*OptionGroupOptionSetting) *OptionGroupOption {
	s.OptionGroupOptionSettings = v
	return s
}
1357863
func setBrokerOption(k, v interface{}) broker.Option {
	return func(o *broker.Options) {
		if o.Context == nil {
			o.Context = context.Background()
		}
		o.Context = context.WithValue(o.Context, k, v)
	}
}