Bugfix Doppelte Einträge
All checks were successful
release-tag / release-image (push) Successful in 1m56s
All checks were successful
release-tag / release-image (push) Successful in 1m56s
This commit is contained in:
4
main.go
4
main.go
@@ -130,8 +130,6 @@ func handleRange(w http.ResponseWriter, r *http.Request) {
|
|||||||
d.Error = err.Error()
|
d.Error = err.Error()
|
||||||
} else {
|
} else {
|
||||||
d.HaveResult = true
|
d.HaveResult = true
|
||||||
d.Rows = rows
|
|
||||||
}
|
|
||||||
for a, b := range rows {
|
for a, b := range rows {
|
||||||
fmt.Println(a, b)
|
fmt.Println(a, b)
|
||||||
octets := strings.Split(b.IPv4, ".")
|
octets := strings.Split(b.IPv4, ".")
|
||||||
@@ -142,6 +140,8 @@ func handleRange(w http.ResponseWriter, r *http.Request) {
|
|||||||
N := "PC" + octets[2] + octets[3]
|
N := "PC" + octets[2] + octets[3]
|
||||||
d.Rows = append(d.Rows, addrPair{IPv4: b.IPv4, IPv6: b.IPv6, Name: N})
|
d.Rows = append(d.Rows, addrPair{IPv4: b.IPv4, IPv6: b.IPv6, Name: N})
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
renderRange(w, d)
|
renderRange(w, d)
|
||||||
default:
|
default:
|
||||||
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
http.Error(w, "Method not allowed", http.StatusMethodNotAllowed)
|
||||||
|
Reference in New Issue
Block a user