testid provides utilities of test id for unit testing of Go.
package a_test
import (
"context"
"testing"
"github.com/google/uuid"
"github.com/newmo-oss/newmotime"
"github.com/newmo-oss/newmotime/newmotimetest"
"github.com/newmo-oss/testid"
)
func Test(t *testing.T) {
tid := uuid.NewString()
ctx := testid.WithValue(context.Background(), tid)
now := newmotime.Now(ctx)
newmotimetest.SetFixedNow(t, ctx, now)
}
MIT