From 65d7f542bc5825902982bb070a3a379a02e639fe Mon Sep 17 00:00:00 2001 From: "Gustavo L de Mello (Guz)" Date: Wed, 22 Jan 2025 16:21:00 -0300 Subject: [PATCH] feat(tinyssert): rename assert package to tinyssert --- {assert => tinyssert}/LICENSE-APACHE | 0 {assert => tinyssert}/LICENSE-MIT | 0 {assert => tinyssert}/README.md | 2 +- assert/assert.go => tinyssert/tinyssert.go | 12 ++++++------ 4 files changed, 7 insertions(+), 7 deletions(-) rename {assert => tinyssert}/LICENSE-APACHE (100%) rename {assert => tinyssert}/LICENSE-MIT (100%) rename {assert => tinyssert}/README.md (97%) rename assert/assert.go => tinyssert/tinyssert.go (98%) diff --git a/assert/LICENSE-APACHE b/tinyssert/LICENSE-APACHE similarity index 100% rename from assert/LICENSE-APACHE rename to tinyssert/LICENSE-APACHE diff --git a/assert/LICENSE-MIT b/tinyssert/LICENSE-MIT similarity index 100% rename from assert/LICENSE-MIT rename to tinyssert/LICENSE-MIT diff --git a/assert/README.md b/tinyssert/README.md similarity index 97% rename from assert/README.md rename to tinyssert/README.md index d2037fb..4b12c5f 100644 --- a/assert/README.md +++ b/tinyssert/README.md @@ -1,4 +1,4 @@ -# \[Tiny\] Assert +# Tiny Assert A minimal assertion package, all in one single file that you can copy and paste to vendor-in and use without adding any dependencies to your project. diff --git a/assert/assert.go b/tinyssert/tinyssert.go similarity index 98% rename from assert/assert.go rename to tinyssert/tinyssert.go index c917f6f..a44bba5 100644 --- a/assert/assert.go +++ b/tinyssert/tinyssert.go @@ -13,7 +13,7 @@ // // An original copy of this file can be found at http://forge.capytal.company/loreddev/x/assert/assert.go. -// # [Tiny] Assert +// # Tiny Assert // // Minimal set of assertions functions for testing and simulation testing, all in // one file. @@ -25,13 +25,13 @@ // // import ( // "log" -// "forge.capytal.company/loreddev/x/assert" +// "forge.capytal.company/loreddev/x/tinyssert" // ) // // func main() { // expected := "value" // value := "value" -// log.Println(assert.Equal(expected, value)) // "true" +// log.Println(tinyssert.Equal(expected, value)) // "true" // } // // Or proverbially, you can create your own "assert" variable and have more control @@ -41,18 +41,18 @@ // // import ( // "log/slog" -// "forge.capytal.company/loreddev/x/assert" +// "forge.capytal.company/loreddev/x/tinyssert" // ) // // var logger = slog.New(slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{})) -// var assert = assert.NewAssertions(assert.Opts{Logger: logger}) +// var assert = tinyssert.NewAssertions(assert.Opts{Logger: logger}) // // func main() { // expected := "value" // value := "not value" // assert.Equal(expected, value) // "expected \"value\", got \"not value\"" with the call stack and returns false // } -package assert +package tinyssert import ( "fmt"