code: func NewSource(opts ...source.Option) source.Source {
  	options := source.NewOptions(opts...)
  
  	// use default config
  	config := api.DefaultConfig()
  
  	// check if there are any addrs
  	a, ok := options.Context.Value(addressKey{}).(string)
  	if ok {
  		addr, port, err := net.SplitHostPort(a)
  		if ae, ok := err.(*net.AddrError); ok && ae.Err == "missing port in address" {
  			port = "8500"
  			addr = a
  			config.Address = fmt.Sprintf("%s:%s", addr, port)
  		} else if err == nil {
  			config.Address = fmt.Sprintf("%s:%s", addr, port)
  		}
  	}
  
  	dc, ok := options.Context.Value(dcKey{}).(string)
  	if ok {
  		config.Datacenter = dc
  	}
  
  	token, ok := options.Context.Value(tokenKey{}).(string)
  	if ok {
  		config.Token = token
  	}
  
  	// create the client
  	client, _ := api.NewClient(config)
  
  	prefix := DefaultPrefix
  	sp := ""
  	f, ok := options.Context.Value(prefixKey{}).(string)
  	if ok {
  		prefix = f
  	}
  
  	if b, ok := options.Context.Value(stripPrefixKey{}).(bool); ok && b {
  		sp = prefix
  	}
  
  	return &consul{
  		prefix:      prefix,
  		stripPrefix: sp,
  		addr:        config.Address,
  		opts:        options,
  		client:      client,
  	}
  }
docs: // NewSource creates a new consul source