github.com/octohelm/storage@v0.0.0-20240516030302-1ac2cc1ea347/internal/testutil/ctx.go (about) 1 package testutil 2 3 import ( 4 "context" 5 "testing" 6 7 "github.com/go-courier/logr" 8 "github.com/go-courier/logr/slog" 9 ) 10 11 func NewContext(t testing.TB) context.Context { 12 t.Helper() 13 ctx := context.Background() 14 return logr.WithLogger(ctx, slog.Logger(slog.Default())) 15 }