go
package deps

import (
  "crypto/tls"
  "crypto/x509"
  "net/http"

mTLS client configuration with custom root CA pool

go security tls
by Leah Thompson 1 tab
go
package mail

import (
  "context"
  "bytes"
  "encoding/json"

Email delivery via HTTP provider with context, timeout, and idempotency

go email background-jobs
by Leah Thompson 1 tab
go
package config

import (
  "io"

  "gopkg.in/yaml.v3"

Safe YAML decoding (KnownFields) for config files

go config yaml
by Leah Thompson 1 tab
go
package web

import (
  "bytes"
  "html/template"
  "net/http"

Template rendering with html/template and strict escaping

go templates http
by Leah Thompson 1 tab
go
package jobs

import (
  "context"
  "math/rand"
  "time"

Robfig cron jobs with context cancellation and jitter

go cron background-jobs
by Leah Thompson 1 tab
go
package api

import "strings"

type Issue struct {
  Field   string `json:"field"`

JSON schema-ish validation with custom error details

go api json
by Leah Thompson 1 tab
go
package config

import (
  "fmt"
  "os"
  "strconv"

Robust environment parsing for bool/int with explicit defaults

go config reliability
by Leah Thompson 1 tab
go
package retry

import (
  "context"
  "net/http"
  "strconv"

Retry on 429 with Retry-After parsing

go http client
by Leah Thompson 1 tab
go
package deps

import (
  "net/http"
  "time"

HTTP client middleware via RoundTripper (headers + timing)

go http client
by Leah Thompson 1 tab
go
package admin

import (
  "net/http"
  "net/http/pprof"
)

Admin-only pprof endpoint with basic auth

go observability pprof
by Leah Thompson 1 tab
go
package api

import (
  "net/http"
  "runtime/debug"
)

Expose build metadata for debugging deploys

go observability build
by Leah Thompson 1 tab
go
package observability

import (
  "context"
  "log/slog"
  "os"

Request-scoped slog logger with JSON output (Go 1.21+)

go logging observability
by Leah Thompson 1 tab