google / go-safeweb

Secure-by-default HTTP servers in Go.
Apache License 2.0
861 stars 67 forks source link

Examples fix and tests introduction #349

Closed AzraelSec closed 2 years ago

AzraelSec commented 2 years ago

This PR fixes the examples attached to this project. In particular, inside of them, composite literals were used to create new ServeMuxConfig instances instead of passing nil to the NewServeMuxConfig function. This was causing the applications to panic during the Mux() method execution.

In addition, some tests have been introduced in order to be notified in case of future breaks.