feat(01-04): wire Cobra CLI with capture-classify-aggregate pipeline
- cmd/netsynth/main.go: Cobra root command with -i, --list-interfaces, --verbose flags - Signal handling via signal.NotifyContext for clean Ctrl+C shutdown - 3-stage pipeline: capture.StartCapture -> classify.NewClassifier -> aggregate.Aggregate - Permission errors surface platform-specific sudo/setcap hint (CAPT-04) - --verbose flag wires aggregate.PrintWindowLine callback for per-window output - Exit summary via aggregate.PrintSummary with dropped packet warning - cmd/netsynth/main_test.go: 3 tests covering flag parsing and help output - go.mod: cobra v1.10.2 and go-pcap promoted to direct dependencies
This commit is contained in:
@@ -2,11 +2,16 @@ module github.com/netsynth/netsynth
|
||||
|
||||
go 1.24.1
|
||||
|
||||
require github.com/gopacket/gopacket v1.5.0
|
||||
require (
|
||||
github.com/gopacket/gopacket v1.5.0
|
||||
github.com/packetcap/go-pcap v0.0.0-20251215121130-f2cf9f991e7c
|
||||
github.com/spf13/cobra v1.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/packetcap/go-pcap v0.0.0-20251215121130-f2cf9f991e7c // indirect
|
||||
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
||||
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||
github.com/spf13/pflag v1.0.9 // indirect
|
||||
golang.org/x/net v0.39.0 // indirect
|
||||
golang.org/x/sys v0.32.0 // indirect
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user