provider/linode.go
func NewLinodeProvider(domainFilter DomainFilter, dryRun bool, appVersion string) (*LinodeProvider, error) {
	token, ok := os.LookupEnv("LINODE_TOKEN")
	if !ok {
		return nil, fmt.Errorf("no token found")
	}

	tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token})

	oauth2Client := &http.Client{
		Transport: &oauth2.Transport{
			Source: tokenSource,
		},
	}

	linodeClient := linodego.NewClient(oauth2Client)
	linodeClient.SetUserAgent(fmt.Sprintf("ExternalDNS/%s linodego/%s", appVersion, linodego.Version))

	provider := &LinodeProvider{
		Client:       &linodeClient,
		domainFilter: domainFilter,
		DryRun:       dryRun,
	}
	return provider, nil
}
func NewLinodeProvider(domainFilter DomainFilter, dryRun bool, appVersion string) (*LinodeProvider, error) {
	token, ok := os.LookupEnv("LINODE_TOKEN")
	if !ok {
		return nil, fmt.Errorf("no token found")
	}

	tokenSource := oauth2.StaticTokenSource(&oauth2.Token{AccessToken: token})

	oauth2Client := &http.Client{
		Transport: &oauth2.Transport{
			Source: tokenSource,
		},
	}

	linodeClient := linodego.NewClient(oauth2Client)
	linodeClient.SetUserAgent(fmt.Sprintf("ExternalDNS/%s linodego/%s", appVersion, linodego.Version))

	provider := &LinodeProvider{
		Client:       &linodeClient,
		domainFilter: domainFilter,
		DryRun:       dryRun,
	}
	return provider, nil
}
// NewLinodeProvider initializes a new Linode DNS based Provider.