Skip to content

Commit 8f0cea0

Browse files
committed
优化对于非以太网 pcap 的加载提示阶段
1 parent 521377e commit 8f0cea0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pcap.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func (p *Pcap) init() error {
7878
p.info = info
7979

8080
if p.file.finder.OnlyEthernet && !p.info.IsEthernet() {
81-
err = errors.New(fmt.Sprintf("pcap not ethernet encapsulation (%s), by %s", p.info.Encapsulation, p.file.finder))
81+
err = errors.New(fmt.Sprintf("not ethernet encapsulation (%s)", p.info.Encapsulation))
8282
return
8383
}
8484

@@ -92,7 +92,6 @@ func (p *Pcap) init() error {
9292
if p.info.IsEthernet() {
9393
err = p.file.copyTo(p.copyFilePath)
9494
} else {
95-
fmt.Printf("not a ethernet pcap\n")
9695
ret := pcapTool.convertDLT2Ethernet(p.file.path, p.copyFilePath, 0)
9796
err = ret.err
9897
}

0 commit comments

Comments
 (0)