a-poor / a-poor/vhttp

Add `proto` validators

未关闭
#4 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Go
星标
2
派生
1
PR 合并指标
30 天内没有已合并 PR

描述

Add [ProtoValidator](https://pkg.go.dev/github.com/a-poor/vhttp#ProtoValidator) functions.

`ProtoValidator` functions implements both the [RequestValidator](https://pkg.go.dev/github.com/a-poor/vhttp#RequestValidator) and [ResponseValidator](https://pkg.go.dev/github.com/a-poor/vhttp#ResponseValidator) interfaces and have the following signature...

```go
type ProtoValidator func(string) error
```

...where the argument is the `.Proto` attribute for either the [http.Request](https://pkg.go.dev/net/http#Request) or [http.Response](https://pkg.go.dev/net/http#Response), depending on how it's used.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。