<commit_before>package server

import (
	"github.com/micro/go-micro/broker"
	"github.com/micro/go-micro/codec"
	"github.com/micro/go-micro/registry"
	"github.com/micro/go-micro/transport"
)

type options struct {
	codecs       map[string]codec.NewCodec
	broker       broker.Broker
	registry     registry.Registry
	transport    transport.Transport
	metadata     map[string]string
	name         string
	address      string
	advertise    string
	id           string
	version      string
	hdlrWrappers []HandlerWrapper
	subWrappers  []SubscriberWrapper
}

func newOptions(opt ...Option) options {
	opts := options{
		codecs: make(map[string]codec.NewCodec),
	}

	for _, o := range opt {
		o(&opts)
	}

	if opts.broker == nil {
		opts.broker = broker.DefaultBroker
	}

	if opts.registry == nil {
		opts.registry = registry.DefaultRegistry
	}

	if opts.transport == nil {
		opts.transport = transport.DefaultTransport
	}

	if len(opts.address) == 0 {<commit_msg>Fix server panic<commit_after>package server

import (
	"github.com/micro/go-micro/broker"
	"github.com/micro/go-micro/codec"
	"github.com/micro/go-micro/registry"
	"github.com/micro/go-micro/transport"
)

type options struct {
	codecs       map[string]codec.NewCodec
	broker       broker.Broker
	registry     registry.Registry
	transport    transport.Transport
	metadata     map[string]string
	name         string
	address      string
	advertise    string
	id           string
	version      string
	hdlrWrappers []HandlerWrapper
	subWrappers  []SubscriberWrapper
}

func newOptions(opt ...Option) options {
	opts := options{
		codecs:   make(map[string]codec.NewCodec),
		metadata: map[string]string{},
	}

	for _, o := range opt {
		o(&opts)
	}

	if opts.broker == nil {
		opts.broker = broker.DefaultBroker
	}

	if opts.registry == nil {
		opts.registry = registry.DefaultRegistry
	}

	if opts.transport == nil {
		opts.transport = transport.DefaultTransport
	}

	if len(opts.address) == 0 {
{'fraction_non_alphanumeric': 0.1076923076923077, 'fraction_numerical': 0.0010256410256410256, 'mean_word_length': 3.2138228941684663, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5128915', 'n_tokens_mistral': 677, 'n_tokens_neox': 649, 'n_words': 134}