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.5k stars 221 forks source link

Use switch/case to make code easier to follow #59

Closed ebastos closed 4 years ago

ebastos commented 4 years ago

The CheckSettings method is using a if/else if/ structure that makes hard to follow the code and cumbersome to add new providers.

Using switch case can alleviate a bit of the cognitive load.

TimothyYe commented 4 years ago

Good job! Thanks for your contribution.