Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dep: remove broken inet.af/netaddr dependency and associated deprecated functions #2262

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vista-
Copy link

@vista- vista- commented Nov 12, 2024

Hey,

I am using gomplate as a library in another project, and noticed that builds started failing due to being unable to pull the module inet.af/netaddr.

It seems like the domain no longer resolves. It could be related to the fact this is a .AF domain, and there have been some payment disputes between the country NIC and registrars recently[0], and the project's new README even warns about deprecating this domain name[1].

Since the IP, IPPrefix and IPRange (and other parts of netaddr) have been merged into the standard library net/netip, and the lack of references to these deprecated internal utility functions, I think it's safe to remove them from the code and tests.

[0] https://www.reuters.com/technology/brokeaf-goes-offline-afghan-web-domains-suspended-amid-payment-dispute-2024-02-16/
[1] https://github.com/go4org/netipx

@vista-
Copy link
Author

vista- commented Nov 12, 2024

$ dig -t A inet.af @1.1.1.1

; <<>> DiG 9.18.30 <<>> -t A inet.af @1.1.1.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 39720
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;inet.af.			IN	A

;; AUTHORITY SECTION:
af.			34400	IN	SOA	soa.coccaregistry.org. hostmaster.coccaregistry.org. 3462864343 21600 3600 604800 86400

;; Query time: 9 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Tue Nov 12 19:27:04 CET 2024
;; MSG SIZE  rcvd: 104

$ dig -t A inet.af @8.8.8.8

; <<>> DiG 9.18.30 <<>> -t A inet.af @8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 9689
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;inet.af.			IN	A

;; AUTHORITY SECTION:
af.			1800	IN	SOA	soa.coccaregistry.org. hostmaster.coccaregistry.org. 3462864343 21600 3600 604800 86400

;; Query time: 24 msec
;; SERVER: 8.8.8.8#53(8.8.8.8) (UDP)
;; WHEN: Tue Nov 12 19:27:09 CET 2024
;; MSG SIZE  rcvd: 104

$ go get inet.af/netaddr
go: inet.af/[email protected]: unrecognized import path "inet.af/netaddr": https fetch: Get "https://inet.af/netaddr?go-get=1": dial tcp: lookup inet.af on 127.0.0.53:53: no such host

@hairyhenderson
Copy link
Owner

There was some related discussion here: #2059

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants