func NewDigitalOceanProvider(domainFilter DomainFilter, dryRun bool) (*DigitalOceanProvider, error) {
	token, ok := os.LookupEnv("DO_TOKEN")
	if !ok {
		return nil, fmt.Errorf("No token found")
	}
	oauthClient := oauth2.NewClient(oauth2.NoContext, oauth2.StaticTokenSource(&oauth2.Token{
		AccessToken: token,
	}))
	client := godo.NewClient(oauthClient)

	provider := &DigitalOceanProvider{
		Client:       client.Domains,
		domainFilter: domainFilter,
		DryRun:       dryRun,
	}
	return provider, nil
}
func NewDigitalOceanProvider(domainFilter DomainFilter, dryRun bool) (*DigitalOceanProvider, error) {
	token, ok := os.LookupEnv("DO_TOKEN")
	if !ok {
		return nil, fmt.Errorf("No token found")
	}
	oauthClient := oauth2.NewClient(oauth2.NoContext, oauth2.StaticTokenSource(&oauth2.Token{
		AccessToken: token,
	}))
	client := godo.NewClient(oauthClient)

	provider := &DigitalOceanProvider{
		Client:       client.Domains,
		domainFilter: domainFilter,
		DryRun:       dryRun,
	}
	return provider, nil
}
func NewDigitalOceanProvider ( domainFilter DomainFilter , dryRun bool ) ( * DigitalOceanProvider , error ) { token , ok := os . LookupEnv ( " " ) if ! ok { return nil , fmt . Errorf ( " " ) } oauthClient := oauth2 . NewClient ( oauth2 . NoContext , oauth2 . StaticTokenSource ( & oauth2 . Token { AccessToken : token , } ) ) client := godo . NewClient ( oauthClient ) provider := & DigitalOceanProvider { Client : client . Domains , domainFilter : domainFilter , DryRun : dryRun , } return provider , nil }
// NewDigitalOceanProvider initializes a new DigitalOcean DNS based Provider.
NewDigitalOceanProvider initializes a new DigitalOcean DNS based Provider .