Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Jul 18, 2023
1 parent e6439fe commit 235d360
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
1 change: 0 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit 235d360

Please sign in to comment.