// RegisterFlagParser registers FlagParserCreator by name
345184
func RegisterFlagParser(name string, creator FlagParserCreator) {
	if _, ok := parserCreators[name]; ok {
		panic("RegisterFlagParser has registered: " + name)
	}
	parserCreators[name] = creator
}
427579
func RegisterFlags(flags Flags) {
	if flags&FlagsLog != 0 {
		RegisterLogFlags()
	}
	if flags&FlagsProfile != 0 {
		RegisterProfileFlags()
	}
	if flags&FlagsTasks != 0 {
		RegisterTaskFlags()
	}
}
846487
func (n *networkServer) RegisterManager(s *grpc.Server) {
	server := &networkServerManager{networkServer: n}

	server.clientRate = ratelimit.NewRegistry(5000, time.Hour)

	pb.RegisterNetworkServerManagerServer(s, server)
	pb_lorawan.RegisterDeviceManagerServer(s, server)
	pb_lorawan.RegisterDevAddrManagerServer(s, server)
}
739769
func RegisterServer(s *grpc.Server, m throttler.Manager) {
	throttlerservicepb.RegisterThrottlerServer(s, NewServer(m))
}
321946
func createFlag(f reflect.StructField, fieldValue reflect.Value, fs *flag.FlagSet) {
	name := strings.ToLower(f.Name)
	if n, ok := nameFromTags(f); ok {
		name = n
	}
	trace.Println("creating flag:", name)
	fs.Var(&myFlag{f, fieldValue, isBool(fieldValue)}, name, makeHelpMessage(f))
}
118076
func (s *Set) Register(f CommonFlag) {
	if f&Help > 0 {
		s.Bool("help", "h", false, "Show help")
	}
	if f&Version > 0 {
		s.Bool("version", "v", false, "Print version information")
	}
	if f&Profile > 0 {
		s.String("profile", "p", "", "Set active profiles")
	}
	if f&Config > 0 {
		s.String("config", "c", "", "Set configuration directory")
	}
}
344784
func (j *Jim) RegisterFlags() {
	flag.Float64Var(&j.DisconnectChance, "jim-disconnect", 0.005, "Chance of disconnect")
	flag.Float64Var(&j.AcceptChance, "jim-accept", 0.99, "Chance of accept")
	flag.Float64Var(&j.LinkSpeedAffect, "jim-linkspeed-affect", 0.1, "Chance of affecting link speed")
	flag.Float64Var(&j.LinkSpeedMin, "jim-linkspeed-min", 1024, "Minimum link speed (in bytes per second)")
	flag.Float64Var(&j.LinkSpeedMax, "jim-linkspeed-max", 10240, "Maximum link speed (in bytes per second)")
	flag.Float64Var(&j.RejectSenderChance, "jim-reject-sender", 0.05, "Chance of rejecting a sender (MAIL FROM)")
	flag.Float64Var(&j.RejectRecipientChance, "jim-reject-recipient", 0.05, "Chance of rejecting a recipient (RCPT TO)")
	flag.Float64Var(&j.RejectAuthChance, "jim-reject-auth", 0.05, "Chance of rejecting authentication (AUTH)")
}
1088757
func (cl *CommandLine) AddFlag(flag CommandLineFlag) {
	if strings.HasPrefix(flag.Flag, "-") {
		panic("flag must not begin with '-'")
	}
	for _, f := range cl.Flags {
		if f == flag {
			return
		}
	}
	cl.Flags = append(cl.Flags, flag)
}
1286845
func (ctx *WriterContext) Register(tag string, wp WriterProcessor) error {
	if _, ok := ctx.plugins[tag]; ok {
		return errors.New(ErrRegisteredPlugin, errorMessages, tag)
	}
	wp.SetContext(ctx)
	ctx.plugins[tag] = wp
	return nil
}
1353778
func (m *Module) RegisterAuthenticator(a Authenticator) {
	m.Authenticators = append(m.Authenticators, a)
}
895682
func registerFlags(c *cli.Config, f *flag.FlagSet) {
	f.BoolVar(&c.List, "list", false, "list possible scanners")
	f.StringVar(&c.Family, "family", "", "scanner family regular expression")
	f.StringVar(&c.Scanner, "scanner", "", "scanner regular expression")
	f.DurationVar(&c.Timeout, "timeout", 5*time.Minute, "duration (ns, us, ms, s, m, h) to scan each host before timing out")
	f.StringVar(&c.CSVFile, "csv", "", "file containing CSV of hosts")
	f.IntVar(&c.NumWorkers, "num-workers", 10, "number of workers to use for scan")
	f.IntVar(&c.MaxHosts, "max-hosts", 100, "maximum number of hosts to scan")
	f.StringVar(&c.IP, "ip", "", "remote server ip")
	f.StringVar(&c.CABundleFile, "ca-bundle", "", "path to root certificate store")
}
463457
func (r *Registry) RegisterParameterParser(paramType string, parser ParameterParser) {
	r.parsersLock.Lock()
	defer r.parsersLock.Unlock()
	r.parsers[paramType] = parser
}
568173
func (f FlagInfo) BindStringFlag(flags *pflag.FlagSet, target *string) {
	// you can't register a flag without a long name
	if len(f.LongName) > 0 {
		flags.StringVarP(target, f.LongName, f.ShortName, f.Default, f.Description)
	}
}
665085
func (m *Mux) RegisterValidator(name string, validator Validator) {
	if m.Validators == nil {
		m.Validators = make(map[string]Validator)
	}
	m.Validators[name] = validator
}
1039905
func RegisterPlugin(name string, plugin Plugin) error {
	pluginMutex.Lock()
	defer pluginMutex.Unlock()
	pluginList[name] = plugin

	return nil
}
866659
func Register(name string, period time.Duration, fn CheckFunc) {
	DefaultChecker.Register(name, period, fn)
}
960397
func (registry *Registry) Register(name string, check Checker) {
	if registry == nil {
		registry = DefaultRegistry
	}
	registry.mu.Lock()
	defer registry.mu.Unlock()
	_, ok := registry.registeredChecks[name]
	if ok {
		panic("Check already exists: " + name)
	}
	registry.registeredChecks[name] = check
}