Skip to content

Commit

Permalink
added HTTP-specific AsValidator
Browse files Browse the repository at this point in the history
  • Loading branch information
johnabass committed Aug 20, 2024
1 parent 6112417 commit bbec630
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions basculehttp/validator.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC
// SPDX-License-Identifier: Apache-2.0

package basculehttp

import (
"net/http"

"github.com/xmidt-org/bascule"
)

// AsValidator an HTTP-specific version of bascule.AsValidator. This function
// eases the syntactic pain of using golang's generics.
func AsValidator[F bascule.ValidatorFunc[*http.Request]](f F) bascule.Validator[*http.Request] {
return bascule.AsValidator[*http.Request](f)
}

0 comments on commit bbec630

Please sign in to comment.