Skip to content

Commit 0fbc783

Browse files
committed
init repo
0 parents  commit 0fbc783

19 files changed

Lines changed: 2585 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
10+
jobs:
11+
checks:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Go
19+
uses: actions/setup-go@v5
20+
with:
21+
go-version-file: go.mod
22+
23+
- name: Verify formatting
24+
run: |
25+
test -z "$(gofmt -l .)"
26+
27+
- name: Run go vet
28+
run: go vet ./...
29+
30+
- name: Compile all packages
31+
run: go test -run '^$' ./...
32+
33+
example-build:
34+
name: example build
35+
runs-on: ubuntu-latest
36+
needs: checks
37+
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Setup Go
43+
uses: actions/setup-go@v5
44+
with:
45+
go-version-file: go.mod
46+
47+
- name: Build example
48+
run: go build ./example
49+
50+
tests:
51+
name: ${{ matrix.name }}
52+
runs-on: ubuntu-latest
53+
needs: checks
54+
strategy:
55+
fail-fast: false
56+
matrix:
57+
include:
58+
- name: TestDefaultConfigProvidesSafeDefaults
59+
pattern: '^TestDefaultConfigProvidesSafeDefaults$'
60+
- name: TestDefaultConfigReturnsIndependentSlices
61+
pattern: '^TestDefaultConfigReturnsIndependentSlices$'
62+
- name: TestNormalizeConfigSanitizesInvalidValues
63+
pattern: '^TestNormalizeConfigSanitizesInvalidValues$'
64+
- name: TestFromContextHandlesNilAndMissingProfile
65+
pattern: '^TestFromContextHandlesNilAndMissingProfile$'
66+
- name: TestMiddlewareInjectsProfileAndPreservesBody
67+
pattern: '^TestMiddlewareInjectsProfileAndPreservesBody$'
68+
- name: TestWrapProvidesConvenienceMiddleware
69+
pattern: '^TestWrapProvidesConvenienceMiddleware$'
70+
- name: TestCaptureBodyTruncatesAndReplaysFullBody
71+
pattern: '^TestCaptureBodyTruncatesAndReplaysFullBody$'
72+
- name: TestAnalyzeFingerprintNormalizesInputsAndBuildsStableHash
73+
pattern: '^TestAnalyzeFingerprintNormalizesInputsAndBuildsStableHash$'
74+
- name: TestAnalyzeFingerprintFallsBackToSHA256
75+
pattern: '^TestAnalyzeFingerprintFallsBackToSHA256$'
76+
- name: TestAnalyzeComplexityJSONStats
77+
pattern: '^TestAnalyzeComplexityJSONStats$'
78+
- name: TestAnalyzeComplexityEmitsWarningWhenJSONLimitIsExceeded
79+
pattern: '^TestAnalyzeComplexityEmitsWarningWhenJSONLimitIsExceeded$'
80+
- name: TestAnalyzeComplexityFormStats
81+
pattern: '^TestAnalyzeComplexityFormStats$'
82+
- name: TestAnalyzeCharsetFlagsSuspiciousPatterns
83+
pattern: '^TestAnalyzeCharsetFlagsSuspiciousPatterns$'
84+
85+
steps:
86+
- name: Checkout
87+
uses: actions/checkout@v4
88+
89+
- name: Setup Go
90+
uses: actions/setup-go@v5
91+
with:
92+
go-version-file: go.mod
93+
94+
- name: Run test
95+
run: go test -run "${{ matrix.pattern }}" ./...

LICENSE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
MIT License
2+
Copyright (c) 2026 GoFurry
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
The above copyright notice and this permission notice shall be included in all
10+
copies or substantial portions of the Software
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
12+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
13+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
14+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
16+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17+
SOFTWARE

0 commit comments

Comments
 (0)