gensample

command
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Command gensample writes testdata/sample.pcap, the small synthetic capture used to exercise percept from the command line.

go run ./internal/gensample testdata/sample.pcap

It lives here rather than under testdata/ because the go tool skips that directory entirely — including `go mod tidy`, which then never records the dependencies this program needs. That bit once: pcapgo pulls in golang.org/x/net on Linux and not on macOS, so the module built locally and failed in CI. Keeping the generator inside the module means its imports are recorded like any others.

The capture is committed; regenerate it when a parser needs traffic to work with.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL