test: improve coverage across package
This commit is contained in:
23
README.md
23
README.md
@@ -41,6 +41,29 @@ func main() {
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Run all tests:
|
||||
|
||||
```bash
|
||||
go test ./...
|
||||
```
|
||||
|
||||
Run tests with coverage:
|
||||
|
||||
```bash
|
||||
go test -cover ./... # per-package summary
|
||||
go test -coverprofile=coverage.out ./... # full profile
|
||||
go tool cover -html=coverage.out -o coverage.html # HTML report
|
||||
```
|
||||
|
||||
Run tests for a specific package:
|
||||
|
||||
```bash
|
||||
go test -v ./analyzer/tcp/
|
||||
go test -v -run TestSSH ./analyzer/tcp/
|
||||
```
|
||||
|
||||
Based on OpenGFW by apernet: https://github.com/apernet/OpenGFW
|
||||
|
||||
## LICENSE
|
||||
|
||||
Reference in New Issue
Block a user