a-poor / a-poor/vhttp

Add `proto` validators

Aperta
#4 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
2
Fork
1
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.