func (o *GetAPIEndpointsURL) Must(u *url.URL, err error) *url.URL {
	if err != nil {
		panic(err)
	}
	if u == nil {
		panic("url can't be nil")
	}
	return u
}
Must is a helper function to panic when the url builder returns an error
package discovery
import (
	"errors"
	"net/url"
	golangswaggerpaths "path"
)
type GetAPIEndpointsURL struct {
	_basePath string
}
func (o *GetAPIEndpointsURL) WithBasePath(bp string) *GetAPIEndpointsURL {
	o.SetBasePath(bp)
	return o
}
func (o *GetAPIEndpointsURL) SetBasePath(bp string) {
	o._basePath = bp
}
func (o *GetAPIEndpointsURL) Build() (*url.URL, error) {
	var _result url.URL
	var _path = "/"
	_basePath := o._basePath
	if _basePath == "" {
		_basePath = "/v2"
	}
	_result.Path = golangswaggerpaths.Join(_basePath, _path)
	return &_result, nil
}