Skip to content

Commit

Permalink
refactor(rdns): make sure the all expected resources comply with inte…
Browse files Browse the repository at this point in the history
…rface
  • Loading branch information
apricote committed Jun 5, 2023
1 parent 74fb0b9 commit e91b869
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions hcloud/rdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,9 @@ func RDNSLookup(i interface{}, ip net.IP) (string, error) {

return rdns.GetDNSPtrForIP(ip)
}

// Make sure that all expected Resources actually implement the interface
var _ RDNSSupporter = &FloatingIP{}
var _ RDNSSupporter = &PrimaryIP{}
var _ RDNSSupporter = &Server{}
var _ RDNSSupporter = &LoadBalancer{}

0 comments on commit e91b869

Please sign in to comment.