github.com/ders/garp

Simple Go parameter parser


License
MIT
Install
go get github.com/ders/garp

Documentation

garp

Package garp implements simple parsing of parameters (e.g. http request query parameters) from an untrusted source.

When parsing query parameters with net/http or encoding/json, for example, a misspelled key on the client side will often result in the value being lost and the zero-value for that field being inserted in its place.

The assumption of this package is that we have a simple and well-defined set of parameters (no nesting) and any deviation should be an error.

Usage

import "github.com/ders/garp"

GoDoc