Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-asn-util
Commits
70ea3626
Commit
70ea3626
authored
May 28, 2020
by
Aarsh Shah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed code
parent
36d54f6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
generate/main.go
generate/main.go
+5
-6
No files found.
generate/main.go
View file @
70ea3626
...
...
@@ -19,15 +19,14 @@ const (
func
main
()
{
// file with the ASN mappings for IPv6 CIDRs.
// See ipv6_asn.csv
//ipv6File := os.Getenv("ASN_IPV6_FILE")
p
:=
"/Users/aarshshah/go/src/github.com/libp2p/go-libp2p-asn-util/generate/ipv6_asn.tsv"
// See ipv6_asn.tsv
ipv6File
:=
os
.
Getenv
(
"ASN_IPV6_FILE"
)
/*
if len(ipv6File) == 0 {
if
len
(
ipv6File
)
==
0
{
panic
(
errors
.
New
(
"environment vars must be provided"
))
}
*/
}
ipv6CidrToAsnMap
:=
readMappingFile
(
p
)
ipv6CidrToAsnMap
:=
readMappingFile
(
ipv6File
)
f
,
err
:=
os
.
Create
(
ipv6OutputFile
)
if
err
!=
nil
{
panic
(
err
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment