discover.go
func New(opts ...Option) (*Discover, error) {
	d := new(Discover)

	for _, opt := range opts {
		if err := opt(d); err != nil {
			return nil, err
		}
	}

	d.once.Do(d.initProviders)

	return d, nil
}
func New(opts ...Option) (*Discover, error) {
	d := new(Discover)

	for _, opt := range opts {
		if err := opt(d); err != nil {
			return nil, err
		}
	}

	d.once.Do(d.initProviders)

	return d, nil
}
// New creates a new discover client with the given options.