We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba5e887 commit 9f8be10Copy full SHA for 9f8be10
cmd/root.go
@@ -4,10 +4,9 @@ import (
4
"log"
5
"os"
6
7
- "github.com/zu1k/nali/internal/constant"
8
-
9
"github.com/spf13/cobra"
10
"github.com/zu1k/nali/internal/app"
+ "github.com/zu1k/nali/internal/constant"
11
)
12
13
var rootCmd = &cobra.Command{
internal/entity/parse.go
@@ -25,13 +25,7 @@ func ParseLine(line string) Entities {
25
}
26
for _, e := range ip6sLoc {
27
text := line[e[0]:e[1]]
28
- if ip, _ := netip.ParseAddr(text); ip.Is4In6() {
29
- tmp = append(tmp, &Entity{
30
- Loc: e,
31
- Type: TypeIPv4,
32
- Text: ip.Unmap().String(),
33
- })
34
- } else {
+ if ip, _ := netip.ParseAddr(text); !ip.Is4In6() {
35
tmp = append(tmp, &Entity{
36
Loc: e,
37
Type: TypeIPv6,
0 commit comments