AdguardTeam / AdguardTeam/AdGuardHome

Properly migrate to `netip`

Offen
#5,035 0 Kommentare 0 Reaktionen 2 zugewiesene Personen Beansprucht von @EugeneOne1 Auf GitHub ansehen
enhancement P4: Low
Vorherrschende Sprache
TypeScript
Sterne
36.9k
Forks
2.5k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

### Prerequisites

- [X] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer

- [X] I have searched other issues and found no duplicates

- [X] I want to request a feature or enhancement and not ask a question

### Description

The Go standard library has introduced the [`netip`][netip-release-note] package as per version 1.18. It includes types and methods for convenient work with IP addresses and networks.

For the moment, AdGuard Home widely uses the legacy [`net.IP`][net-ip-doc] type in all the network-aware code. This issue should be used to track the progress of gradual migration to the new `netip.Addr`/`netip.AddrPort`/`netip.Prefix` types.

[netip-release-note]: https://tip.golang.org/doc/go1.18#netip
[net-ip-doc]: https://pkg.go.dev/net#IP

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.