AdguardTeam / AdguardTeam/AdGuardHome

Properly migrate to `netip`

Open
#5,035 0 comments 0 reactions 2 assignees Claimed by @EugeneOne1 View on GitHub
enhancement P4: Low
Dominant language
TypeScript
Stars
36.9k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

### 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.