Installation
Pebble requires Go 1.22 or later. It has a single dependency, go.opentelemetry.io/otel, which is used only if you enable tracing.
Adding Pebble to your project
Use go get from your project root:
go get github.com/example/pebble@latest
This installs the latest stable release. If you want to pin to a specific version, append the version tag:
go get github.com/example/pebble@v0.18.2
Verifying the install
Create a small Go file to verify the installation:
package main
import (
"context"
"fmt"
"github.com/example/pebble"
)
func main() {
client := pebble.New(pebble.Options{})
resp, err := client.Get(context.Background(), "https://httpbin.org/get")
if err != nil {
fmt.Println("error:", err)
return
}
defer resp.Body.Close()
fmt.Println("status:", resp.StatusCode)
}
Run it with go run main.go. If you see status: 200, you're set.
What's next
The Quick start guide walks through the most common use cases. For a complete API listing, see the API reference. For example programs, see Examples.
If you run into trouble, the issue tracker is the best place to ask. Please search before opening a new issue; many common questions have been answered.