diff --git a/README.md b/README.md index b10d458..da75d4b 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,7 @@ func main() { treblle.Configure(treblle.Configuration{ APIKey: "YOUR API KEY HERE", ProjectID: "YOUR PROJECT ID HERE", - KeysToMask: []string{"password", "card_number"}, // optional, mask fields you don't want sent to Treblle - ServerURL: "https://rocknrolla.treblle.com", // optional, don't use default server URL + AdditionalFieldsToMask: []string{"password", "card_number"}, // optional, specify additional fields to mask } // rest of your program. @@ -98,6 +97,14 @@ mux := http.NewServeMux() mux.Handle("/", treblle.Middleware(yourHandler)) ``` +## gorilla/mux +To setup the `treblle.Middleware` in `gorilla/mux`, use it as a global middleware: + +```go + r := mux.NewRouter() + r.Use(treblle.Middleware) +``` + > See the [docs](https://docs.treblle.com/en/integrations/go) for this SDK to learn more. ## Available SDKs diff --git a/go.sum b/go.sum index b3fbc8f..98dc31d 100644 --- a/go.sum +++ b/go.sum @@ -4,7 +4,6 @@ github.com/go-chi/chi v1.5.4 h1:QHdzF2szwjqVV4wmByUnTcsbIg7UGaQ0tPF2t5GcAIs= github.com/go-chi/chi v1.5.4/go.mod h1:uaf8YgoFazUOkPBG7fxPftUylNumIev9awIWOENIuEg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/stretchr/objx v0.1.0 h1:4G4v2dO3VZwixGIRoQ5Lfboy6nUhCyYzaqnIAPPhYs4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=