TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.52k stars 224 forks source link

add DigitalOcean provider #240

Closed Sleavely closed 7 months ago

Sleavely commented 7 months ago

Adds support for domains managed by DigitalOcean.

I'm not a particularly experienced Go author but I used the CloudFlare provider as a template so I'm hoping I didn't violate any conventions. I've tested that creating, updating and skipping of domains works for subdomains and root domains (using "@" as a subdomain).

TimothyYe commented 7 months ago

Thanks, later I'll update the web panel to support this new provider.

TimothyYe commented 7 months ago

It seems the lint job shows 2 errors, would u pls help to fix them?

Sleavely commented 7 months ago

update the web panel to support this new provider

Oh, I didn't see any references to specific providers in the web/ directory so I assumed it would work out of the box. Anything I can do to help?

Linting errors are ✔️

TimothyYe commented 7 months ago

For the web panel, I think the only thing that should be updated is at: https://github.com/TimothyYe/godns/blob/master/internal/utils/constants.go#L98-L101

I see you've already added this new provider setting, it looks good!

TimothyYe commented 7 months ago

Merged, thanks for your contribution!