-
-
Notifications
You must be signed in to change notification settings - Fork 0
Development
🇧🇷 Português
Requires Go 1.24+.
git clone https://github.com/gsjonio/netwp.git
cd netwp
go build ./...
go test ./...
go vet ./...
gofmt -l . # should print nothingEvery push and PR runs, on Windows and Ubuntu:
-
go build,go vet,go test ./... golangci-lint-
go test -race ./...(Ubuntu, needs cgo, so it is not part of the local check on a machine without a C toolchain) - a short fuzzing pass over the DNS/mDNS/ARP wire parsers
-race needs a C toolchain (cgo), so it is not in the default local go test.
The race and fuzz jobs cover the concurrent discovery paths and the parsers of
untrusted network input.
netwp is hexagonal (see Architecture). The rule of thumb when adding a capability:
- Domain logic (a new use case, a type, a heuristic) goes in
internal/core, behind a port interface.corenever importsnet,os/exec, orsyscall. - Anything that talks to the OS or network goes in
internal/adapter/*, implementing a core port. Platform-specific code is split by build tags (_windows.go,_linux.go,_other.go). - CLI wiring stays thin, in
cmd/netwp. - Terminal rendering goes in
internal/tui.
Non-trivial logic (a branch, a parser, a heuristic) ships with a test. The parsers that read network bytes also have fuzz targets.
The README and README.pt-BR are bilingual and must stay structurally identical. If a change is something a beginner needs explained, update the guide pair too.
Full contributor guide, commit-message conventions, and PR checklist: CONTRIBUTING.md. This project follows the Code of Conduct.
netwp · MIT · made by gsjonio · buy me a coffee ☕