chore: add unit test for WithCodeResponseWriter (#5028)

Signed-off-by: kevin <wanjunfeng@gmail.com>
This commit is contained in:
Kevin Wan
2025-07-25 21:45:47 +08:00
committed by GitHub
parent 0be63c3625
commit 25f37ca750
5 changed files with 44 additions and 30 deletions

View File

@@ -293,7 +293,6 @@ func WithSignature(signature SignatureConf) RouteOption {
func WithSSE() RouteOption {
return func(r *featuredRoutes) {
r.sse = true
r.timeout = ptrOfDuration(0)
}
}
@@ -335,10 +334,6 @@ func handleError(err error) {
panic(err)
}
func ptrOfDuration(d time.Duration) *time.Duration {
return &d
}
func validateSecret(secret string) {
if len(secret) < 8 {
panic("secret's length can't be less than 8")