1
0
Fork 0
mirror of https://gitlab.com/pnx-tools/dns-updater.git synced 2026-06-16 05:54:56 +02:00
dns-updater/dns/record.go
2025-10-13 17:03:31 +02:00

26 lines
379 B
Go

package dns
import (
"net"
)
type Record struct {
Id string // Internal id.
Name string
Ip net.IP
}
type RecordList []Record
func (l *RecordList) Add(record Record) {
*l = append(*l, record)
}
func (l RecordList) FindByName(name string) (Record, bool) {
for _, record := range l {
if record.Name == name {
return record, true
}
}
return Record{}, false
}