Explorar o código

string func for DNSUpdateAction

Matthew R Kasun %!s(int64=2) %!d(string=hai) anos
pai
achega
71f41fefb8
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      models/dnsEntry.go

+ 4 - 0
models/dnsEntry.go

@@ -17,6 +17,10 @@ const (
 	DNSInsert
 )
 
+func (action DNSUpdateAction) String() string {
+	return [...]string{"DNSDeleteByIP", "DNSDeletByName", "DNSReplaceName", "DNSReplaceIP", "DNSInsert"}[action]
+}
+
 // DNSUpdate data for updating entries in /etc/hosts
 type DNSUpdate struct {
 	Action     DNSUpdateAction