From 264f0f1f00f0b79b90474102714269ba7b3d4512 Mon Sep 17 00:00:00 2001 From: "matthew.cobbing" Date: Thu, 22 Feb 2024 13:41:53 +0000 Subject: [PATCH] feat: use any generic type --- CHANGELOG.md | 6 ++++++ README.md | 2 +- bromide.go | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd8ee7c..5e7f96d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.0.2] - 2024-02-22 + +### Changed + +- Use `any` generic for snapshot function instead of `comparable` + ## [0.0.1] - 2024-02-19 * First Release 🚀 diff --git a/README.md b/README.md index 0d9ed53..6eccc85 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,7 @@ FAIL ### Review ```sh -go install github.com/cobbinma/bromide/cmd/bromide@v0.0.1 +go install github.com/cobbinma/bromide/cmd/bromide@v0.0.2 ``` ![screenshot](./assets/Screenshot.png) diff --git a/bromide.go b/bromide.go index bc1f97e..0e0688c 100644 --- a/bromide.go +++ b/bromide.go @@ -11,7 +11,7 @@ import ( "github.com/davecgh/go-spew/spew" ) -func Snapshot[K comparable](t *testing.T, item K, options ...Option) { +func Snapshot[K any](t *testing.T, item K, options ...Option) { t.Helper() config := &config{}