diff --git a/.github/wordlist.txt b/.github/wordlist.txt new file mode 100644 index 000000000..fff7970e6 --- /dev/null +++ b/.github/wordlist.txt @@ -0,0 +1,180 @@ +API +APIs +BSON +CI +CIDR +CLI +CLIs +CSV +DCO +DockerHub +FAQ +GC +GOPATH +GOROOT +GoDoc +Godoc +HTTP +HTTPS +HUGO +ID +IDs +IP +IPs +ISBN +JSON +Kubernetes +Markdown +NaN +OAI +OAuth +OpenAPI +PR +PRs +README +SSN +TCP +TLS +TODO +UI +ULID +URI +URL +URLs +USD +UUID +YAML +api +apis +arg +args +assignees +auth +authenticated +authenticator +authenticators +authorized +authorizer +authorizers +backquote +backquoted +bash +benchmarking +bitmask +bson +bytesize +cancelled +ci +cidr +cli +clis +codecov +codegen +config +configs +csv +customizable +dependabot +deserialize +deserialized +deserializer +docker +e.g. +env +err's +faq +flattener +fuzzying +gc +github +go-openapi +godoc +golang +golangci +golint +goroutine +goroutines +hostname +hostnames +html +http +https +hugo +i.e. +id +implementor +implementors +initialism +initialisms +io +ipsum +ipsums +ipv4 +ipv6 +isbn +json +jsonschema +k8s +kubernetes +linter +linters +listA +listB +loren +lowercases +markdown +marshaled +marshaling +middleware +middlewares +mixin +multipart +mutex +oai +oauth +oauth2 +openapi +param +params +rebase +rebased +redeclare +repo +repos +roundtrip +roundtripper +schema +schemas +serialize +serialized +serializer +sexualized +ssn +struct +structs +submodule +subpackage +substring +swagger +tls +toolchain +ui +ulid +unmarshal +unmarshaled +unmarshaling +untyped +uri +url +urls +utf-8 +uuid +v1 +v2 +v3 +validator +validators +waitFor +workspace +workspaces +yaml diff --git a/.gitignore b/.gitignore index c4b1b64f0..36bbc154d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ vendor Godeps .idea *.out +.mcp.json +.claude/**.md +!.claude/CLAUDE.md diff --git a/assert/assert_assertions.go b/assert/assert_assertions.go index ed6ee3924..b5fc4eea1 100644 --- a/assert/assert_assertions.go +++ b/assert/assert_assertions.go @@ -291,7 +291,7 @@ func EqualValues(t T, expected any, actual any, msgAndArgs ...any) bool { return assertions.EqualValues(t, expected, actual, msgAndArgs...) } -// Error asserts that a function returned a non-nil error (ie. an error). +// Error asserts that a function returned a non-nil error (i.e. an error). // // # Usage // @@ -901,10 +901,10 @@ func Implements(t T, interfaceObject any, object any, msgAndArgs ...any) bool { // Delta must be greater than or equal to zero. // // Expected and actual values should convert to float64. -// To compare large integers that can't be represented accurately as float64 (eg. uint64), +// To compare large integers that can't be represented accurately as float64 (e.g. uint64), // prefer [InDeltaT] to preserve the original type. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -977,7 +977,7 @@ func InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...an // // Delta must be greater than or equal to zero. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1002,7 +1002,7 @@ func InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Numb // InEpsilon asserts that expected and actual have a relative error less than epsilon. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1062,7 +1062,7 @@ func InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs . // Unlike [InDeltaT], which preserves the original type, [InEpsilonT] converts the expected and actual // numbers to float64, since the relative error doesn't make sense as an integer. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1755,7 +1755,7 @@ func Nil(t T, object any, msgAndArgs ...any) bool { return assertions.Nil(t, object, msgAndArgs...) } -// NoError asserts that a function returned a nil error (ie. no error). +// NoError asserts that a function returned a nil error (i.e. no error). // // # Usage // diff --git a/codegen/internal/generator/funcmaps/markdown.go b/codegen/internal/generator/funcmaps/markdown.go index c7d3fc463..5597d03cf 100644 --- a/codegen/internal/generator/funcmaps/markdown.go +++ b/codegen/internal/generator/funcmaps/markdown.go @@ -252,9 +252,9 @@ func addExamples(trailer []string, funcName string, perPkgExamples []packageExam trailer = append(trailer, `{{% cards %}}`) for _, example := range pe.examples { - trailer = append(trailer, `{{% card href="https://go.dev/play/" %}}`) + trailer = append(trailer, `{{% card %}}`) trailer = append(trailer, "\n") - trailer = append(trailer, `*Copy and click to open Go Playground*`) + trailer = append(trailer, `*[Copy and click to open Go Playground](https://go.dev/play/)*`) trailer = append(trailer, "\n") trailer = append(trailer, "```go") trailer = append(trailer, fmt.Sprintf("// real-world test would inject *testing.T from Test%s(t *testing.T)", funcName)) diff --git a/docs/doc-site/api/boolean.md b/docs/doc-site/api/boolean.md index d57aa7e74..80918e903 100644 --- a/docs/doc-site/api/boolean.md +++ b/docs/doc-site/api/boolean.md @@ -48,10 +48,10 @@ False asserts that the specified value is false. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -82,10 +82,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -163,10 +163,10 @@ The type constraint [Boolean](https://pkg.go.dev/github.com/go-openapi/testify/v {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -197,10 +197,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -270,10 +270,10 @@ True asserts that the specified value is true. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -304,10 +304,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -385,10 +385,10 @@ The type constraint [Boolean](https://pkg.go.dev/github.com/go-openapi/testify/v {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -419,10 +419,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/collection.md b/docs/doc-site/api/collection.md index 5aa39ee36..5fb6d8023 100644 --- a/docs/doc-site/api/collection.md +++ b/docs/doc-site/api/collection.md @@ -96,10 +96,10 @@ specified substring or element. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -130,10 +130,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -209,10 +209,10 @@ the number of appearances of each of them in both lists should match. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -243,10 +243,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -322,10 +322,10 @@ the number of appearances of each of them in both lists should match. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -356,10 +356,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -437,10 +437,10 @@ See also [reflect.Len](https://pkg.go.dev/reflect#Len). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -471,10 +471,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -555,10 +555,10 @@ Go native comparable types are explained there: [comparable-types](https://go.de {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -589,10 +589,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -662,10 +662,10 @@ MapNotContainsT asserts that the specified map does not contain a key. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -696,10 +696,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -772,10 +772,10 @@ specified substring or element. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -806,10 +806,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -888,10 +888,10 @@ This is an inverse of ElementsMatch. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -922,10 +922,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1004,10 +1004,10 @@ This is an inverse of ElementsMatch. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1038,10 +1038,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1117,10 +1117,10 @@ only the map key is evaluated. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1151,10 +1151,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1232,10 +1232,10 @@ Go native comparable types are explained there: [comparable-types](https://go.de {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1267,10 +1267,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1343,10 +1343,10 @@ See [SeqContainsT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Se {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1378,10 +1378,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1454,10 +1454,10 @@ Go native comparable types are explained there: [comparable-types](https://go.de {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1488,10 +1488,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1563,10 +1563,10 @@ See [SliceContainsT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert# {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1597,10 +1597,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1670,10 +1670,10 @@ SliceNotSubsetT asserts that a slice of comparable elements does not contain all {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1704,10 +1704,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1777,10 +1777,10 @@ SliceSubsetT asserts that a slice of comparable elements contains all the elemen {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1811,10 +1811,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1886,10 +1886,10 @@ Strings may be go strings or []byte according to the type constraint [Text](http {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1920,10 +1920,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1995,10 +1995,10 @@ See [StringContainsT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -2029,10 +2029,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -2111,10 +2111,10 @@ nil values are considered as empty sets. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -2145,10 +2145,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/comparison.md b/docs/doc-site/api/comparison.md index 041a605a7..913e2d787 100644 --- a/docs/doc-site/api/comparison.md +++ b/docs/doc-site/api/comparison.md @@ -77,10 +77,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -111,10 +111,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -193,10 +193,10 @@ See also [Greater](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Gr {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -227,10 +227,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -318,10 +318,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -352,10 +352,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -438,10 +438,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -472,10 +472,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -550,10 +550,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -584,10 +584,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -664,10 +664,10 @@ LessOrEqual asserts that the first element is less than or equal to the second. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -698,10 +698,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -788,10 +788,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -822,10 +822,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -907,10 +907,10 @@ To compare values that need a type conversion (e.g. float32 against float64), yo {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -941,10 +941,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1015,10 +1015,10 @@ Negative asserts that the specified element is strictly negative. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1049,10 +1049,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1127,10 +1127,10 @@ NegativeT asserts that the specified element of a signed numeric type is strictl {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1161,10 +1161,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1235,10 +1235,10 @@ Positive asserts that the specified element is strictly positive. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1269,10 +1269,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1347,10 +1347,10 @@ PositiveT asserts that the specified element of a signed numeric type is strictl {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1381,10 +1381,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/condition.md b/docs/doc-site/api/condition.md index 65ec434de..0b5186302 100644 --- a/docs/doc-site/api/condition.md +++ b/docs/doc-site/api/condition.md @@ -47,10 +47,10 @@ Condition uses a [Comparison](https://pkg.go.dev/github.com/go-openapi/testify/v {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -83,10 +83,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -179,10 +179,10 @@ A blocking condition will cause [Eventually](https://pkg.go.dev/github.com/go-op {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -216,10 +216,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -325,10 +325,10 @@ It may write to variables outside its scope without triggering race conditions. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -362,10 +362,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -456,10 +456,10 @@ A blocking condition will cause [Never](https://pkg.go.dev/github.com/go-openapi {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -493,10 +493,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/equality.md b/docs/doc-site/api/equality.md index 3b9f5f581..61009fa18 100644 --- a/docs/doc-site/api/equality.md +++ b/docs/doc-site/api/equality.md @@ -94,10 +94,10 @@ Pointer values are "empty" if the pointer is nil or if the pointed value is "emp {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -128,10 +128,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -210,10 +210,10 @@ Function equality cannot be determined and will always fail. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -244,10 +244,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -331,10 +331,10 @@ Function equality cannot be determined and will always fail. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -370,10 +370,10 @@ type dummyStruct struct { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -459,10 +459,10 @@ use [Equal](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Equal) in {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -493,10 +493,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -569,10 +569,10 @@ Function equality cannot be determined and will always fail. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -603,10 +603,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -680,10 +680,10 @@ Exactly asserts that two objects are equal in value and type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -714,10 +714,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -791,10 +791,10 @@ Nil asserts that the specified object is nil. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -825,10 +825,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -904,10 +904,10 @@ NotEmpty asserts that the specified object is NOT [Empty](https://pkg.go.dev/git {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -938,10 +938,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1018,10 +1018,10 @@ Function equality cannot be determined and will always fail. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1052,10 +1052,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1131,10 +1131,10 @@ See [EqualT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#EqualT). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1165,10 +1165,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1240,10 +1240,10 @@ Function equality cannot be determined and will always fail. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1274,10 +1274,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1351,10 +1351,10 @@ assertions.NotNil(t, err) {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1385,10 +1385,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1464,10 +1464,10 @@ See [Same](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Same). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1507,10 +1507,10 @@ func ptr[T any](value T) *T { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1595,10 +1595,10 @@ See [SameT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#SameT). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1638,10 +1638,10 @@ func ptr[T any](value T) *T { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1726,10 +1726,10 @@ Unlike [Equal](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Equal) {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1766,10 +1766,10 @@ var ( {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1851,10 +1851,10 @@ See [Same](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Same). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1891,10 +1891,10 @@ var ( {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/error.md b/docs/doc-site/api/error.md index b84f32a04..2fe557a80 100644 --- a/docs/doc-site/api/error.md +++ b/docs/doc-site/api/error.md @@ -61,10 +61,10 @@ and that it is equal to the provided error. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -95,10 +95,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -159,7 +159,7 @@ func main() { {{< /tabs >}} ### Error{#error} -Error asserts that a function returned a non-nil error (ie. an error). +Error asserts that a function returned a non-nil error (i.e. an error). {{% expand title="Examples" %}} {{< tabs >}} @@ -173,10 +173,10 @@ Error asserts that a function returned a non-nil error (ie. an error). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -207,10 +207,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -286,10 +286,10 @@ This is a wrapper for [errors.As](https://pkg.go.dev/errors#As). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -327,10 +327,10 @@ func (d *dummyError) Error() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -413,10 +413,10 @@ error) and that the error contains the specified substring. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -447,10 +447,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -526,10 +526,10 @@ This is a wrapper for [errors.Is](https://pkg.go.dev/errors#Is). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -561,10 +561,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -626,7 +626,7 @@ func main() { {{< /tabs >}} ### NoError{#noerror} -NoError asserts that a function returned a nil error (ie. no error). +NoError asserts that a function returned a nil error (i.e. no error). {{% expand title="Examples" %}} {{< tabs >}} @@ -642,10 +642,10 @@ NoError asserts that a function returned a nil error (ie. no error). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -676,10 +676,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -754,10 +754,10 @@ but if so, sets target to that error value. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -795,10 +795,10 @@ func (d *dummyError) Error() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -881,10 +881,10 @@ This is a wrapper for [errors.Is](https://pkg.go.dev/errors#Is). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -916,10 +916,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/file.md b/docs/doc-site/api/file.md index 2a199819c..f5f5df95e 100644 --- a/docs/doc-site/api/file.md +++ b/docs/doc-site/api/file.md @@ -54,10 +54,10 @@ if the path is a file rather a directory or there is an error checking whether i {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -93,10 +93,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -176,10 +176,10 @@ It fails if the path points to an existing _directory_ only. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -215,10 +215,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -298,10 +298,10 @@ It fails if the file is not empty, if the path points to a directory or there is {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -337,10 +337,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -420,10 +420,10 @@ the path points to a directory or there is an error when trying to check the fil {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -459,10 +459,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -542,10 +542,10 @@ It fails if the file is empty, if the path points to a directory or there is an {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -581,10 +581,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -664,10 +664,10 @@ if the path points to an existing _file_ only. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -703,10 +703,10 @@ func testDataPath() string { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/http.md b/docs/doc-site/api/http.md index 80758c1d3..76a0e0799 100644 --- a/docs/doc-site/api/http.md +++ b/docs/doc-site/api/http.md @@ -57,10 +57,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -98,10 +98,10 @@ func httpBody(w http.ResponseWriter, r *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -185,10 +185,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -226,10 +226,10 @@ func httpBody(w http.ResponseWriter, r *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -312,10 +312,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -351,10 +351,10 @@ func httpError(w http.ResponseWriter, _ *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -435,10 +435,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -474,10 +474,10 @@ func httpRedirect(w http.ResponseWriter, _ *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -558,10 +558,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -597,10 +597,10 @@ func httpOK(w http.ResponseWriter, _ *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -681,10 +681,10 @@ Returns whether the assertion was successful (true) or not (false). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -720,10 +720,10 @@ func httpOK(w http.ResponseWriter, _ *http.Request) { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/json.md b/docs/doc-site/api/json.md index 5b80ddb76..840464b7b 100644 --- a/docs/doc-site/api/json.md +++ b/docs/doc-site/api/json.md @@ -53,10 +53,10 @@ Expected and actual must be valid JSON. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -87,10 +87,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -166,10 +166,10 @@ Expected and actual must be valid JSON. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -200,10 +200,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -289,10 +289,10 @@ Expected and actual must be valid JSON. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -323,10 +323,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -406,10 +406,10 @@ from the expected ones. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -445,10 +445,10 @@ type dummyStruct struct { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -535,10 +535,10 @@ the unmarshaling would take this type to unmarshal as a map[string](https://pkg. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -574,10 +574,10 @@ type dummyStruct struct { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/number.md b/docs/doc-site/api/number.md index 32923a5a3..ef120d90a 100644 --- a/docs/doc-site/api/number.md +++ b/docs/doc-site/api/number.md @@ -49,10 +49,10 @@ InDelta asserts that the two numerals are within delta of each other. Delta must be greater than or equal to zero. Expected and actual values should convert to float64. -To compare large integers that can't be represented accurately as float64 (eg. uint64), +To compare large integers that can't be represented accurately as float64 (e.g. uint64), prefer [InDeltaT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaT) to preserve the original type. -#### Behavior with IEEE floating point arithmetics +#### Behavior with IEEE floating point arithmetic - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) - expected +Inf is matched only by a +Inf @@ -69,10 +69,10 @@ assertions.InDelta(t, math.Pi, 22/7.0, 0.01) {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -103,10 +103,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -182,10 +182,10 @@ See [InDelta](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDelta {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -216,10 +216,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -295,10 +295,10 @@ See [InDelta](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDelta {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -329,10 +329,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -401,7 +401,7 @@ The main difference with [InDelta](https://pkg.go.dev/github.com/go-openapi/test Delta must be greater than or equal to zero. -#### Behavior with IEEE floating point arithmetics +#### Behavior with IEEE floating point arithmetic - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) - expected +Inf is matched only by a +Inf @@ -418,10 +418,10 @@ assertions.InDeltaT(t, math.Pi, 22/7.0, 0.01) {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -452,10 +452,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -514,7 +514,7 @@ func main() { ### InEpsilon{#inepsilon} InEpsilon asserts that expected and actual have a relative error less than epsilon. -#### Behavior with IEEE floating point arithmetics +#### Behavior with IEEE floating point arithmetic - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) - expected +Inf is matched only by a +Inf @@ -539,10 +539,10 @@ This allows [InEpsilonT](https://pkg.go.dev/github.com/go-openapi/testify/v2/ass {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -573,10 +573,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -652,10 +652,10 @@ See [InEpsilon](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEps {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -686,10 +686,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -758,7 +758,7 @@ since relative error is mathematically undefined for zero values. Unlike [InDeltaT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InDeltaT), which preserves the original type, [InEpsilonT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#InEpsilonT) converts the expected and actual numbers to float64, since the relative error doesn't make sense as an integer. -#### Behavior with IEEE floating point arithmetics +#### Behavior with IEEE floating point arithmetic - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) - expected +Inf is matched only by a +Inf @@ -783,10 +783,10 @@ This allows [InEpsilonT](https://pkg.go.dev/github.com/go-openapi/testify/v2/ass {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -817,10 +817,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/ordering.md b/docs/doc-site/api/ordering.md index 4d62e6c03..52aec1a22 100644 --- a/docs/doc-site/api/ordering.md +++ b/docs/doc-site/api/ordering.md @@ -68,10 +68,10 @@ IsDecreasing asserts that the collection is strictly decreasing. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -102,10 +102,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -181,10 +181,10 @@ IsDecreasingT asserts that a slice of [Ordered](https://pkg.go.dev/github.com/go {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -215,10 +215,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -290,10 +290,10 @@ IsIncreasing asserts that the collection is strictly increasing. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -324,10 +324,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -403,10 +403,10 @@ IsIncreasingT asserts that a slice of [Ordered](https://pkg.go.dev/github.com/go {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -437,10 +437,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -512,10 +512,10 @@ IsNonDecreasing asserts that the collection is not strictly decreasing. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -546,10 +546,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -625,10 +625,10 @@ IsNonDecreasingT asserts that a slice of [Ordered](https://pkg.go.dev/github.com {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -659,10 +659,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -734,10 +734,10 @@ IsNonIncreasing asserts that the collection is not increasing. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -768,10 +768,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -847,10 +847,10 @@ IsNonIncreasingT asserts that a slice of [Ordered](https://pkg.go.dev/github.com {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -881,10 +881,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -958,10 +958,10 @@ Unlike [IsDecreasingT](https://pkg.go.dev/github.com/go-openapi/testify/v2/asser {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -992,10 +992,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1069,10 +1069,10 @@ Unlike [IsIncreasingT](https://pkg.go.dev/github.com/go-openapi/testify/v2/asser {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1103,10 +1103,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/panic.md b/docs/doc-site/api/panic.md index 327f7603b..cf63bb6e6 100644 --- a/docs/doc-site/api/panic.md +++ b/docs/doc-site/api/panic.md @@ -47,10 +47,10 @@ NotPanics asserts that the code inside the specified function does NOT panic. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -82,10 +82,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -160,10 +160,10 @@ Panics asserts that the code inside the specified function panics. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -196,10 +196,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -276,10 +276,10 @@ and that the recovered panic value is an error that satisfies the EqualError com {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -312,10 +312,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -393,10 +393,10 @@ and that the recovered panic value equals the expected panic value. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -429,10 +429,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/safety.md b/docs/doc-site/api/safety.md index 394e5483b..310f758e8 100644 --- a/docs/doc-site/api/safety.md +++ b/docs/doc-site/api/safety.md @@ -59,10 +59,10 @@ as t.Cleanup is called after the leak check. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -88,10 +88,10 @@ func main() { {{% /card %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -142,10 +142,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -171,10 +171,10 @@ func main() { {{% /card %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/string.md b/docs/doc-site/api/string.md index f2ebb6058..e3f376263 100644 --- a/docs/doc-site/api/string.md +++ b/docs/doc-site/api/string.md @@ -51,10 +51,10 @@ See [Regexp](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Regexp). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -85,10 +85,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -165,10 +165,10 @@ See [RegexpT](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#RegexpT {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -199,10 +199,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -277,10 +277,10 @@ The actual argument to be matched may be a string, []byte or anything that print {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -311,10 +311,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -387,10 +387,10 @@ See [Regexp](https://pkg.go.dev/github.com/go-openapi/testify/v2/assert#Regexp). failure: "^start", "not starting" {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -421,10 +421,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/time.md b/docs/doc-site/api/time.md index cd6179857..cce117c3a 100644 --- a/docs/doc-site/api/time.md +++ b/docs/doc-site/api/time.md @@ -41,10 +41,10 @@ WithinDuration asserts that the two times are within duration delta of each othe {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -76,10 +76,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -154,10 +154,10 @@ WithinRange asserts that a time is within a time range (inclusive). {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -189,10 +189,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/docs/doc-site/api/type.md b/docs/doc-site/api/type.md index 08fba5080..9407277a8 100644 --- a/docs/doc-site/api/type.md +++ b/docs/doc-site/api/type.md @@ -66,10 +66,10 @@ Implements asserts that an object is implemented by the specified interface. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -113,10 +113,10 @@ func ptr[T any](value T) *T { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -203,10 +203,10 @@ IsNotOfTypeT asserts that an object is not of a given type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -239,10 +239,10 @@ type myType float64 {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -314,10 +314,10 @@ IsNotType asserts that the specified objects are not of the same type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -348,10 +348,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -425,10 +425,10 @@ IsOfTypeT asserts that an object is of a given type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -461,10 +461,10 @@ type myType float64 {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -536,10 +536,10 @@ IsType asserts that the specified objects are of the same type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -570,10 +570,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -650,10 +650,10 @@ are comparable to [reflect.Invalid](https://pkg.go.dev/reflect#Invalid). See als {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -685,10 +685,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -763,10 +763,10 @@ NotImplements asserts that an object does not implement the specified interface. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -797,10 +797,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -877,10 +877,10 @@ are comparable to [reflect.Invalid](https://pkg.go.dev/reflect#Invalid). See als {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -912,10 +912,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -990,10 +990,10 @@ NotZero asserts that i is not the zero value for its type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1024,10 +1024,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1101,10 +1101,10 @@ Zero asserts that i is the zero value for its type. {{< /tab >}} {{% tab title="Testable Examples (assert)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go @@ -1135,10 +1135,10 @@ func main() { {{% tab title="Testable Examples (require)" %}} {{% cards %}} -{{% card href="https://go.dev/play/" %}} +{{% card %}} -*Copy and click to open Go Playground* +*[Copy and click to open Go Playground](https://go.dev/play/)* ```go diff --git a/internal/assertions/error.go b/internal/assertions/error.go index 45f14d29d..5a25835e8 100644 --- a/internal/assertions/error.go +++ b/internal/assertions/error.go @@ -26,7 +26,7 @@ func (e TestExampleError) Error() string { // the test code more readable. const ErrTest TestExampleError = "assert.ErrTest general error for testing" -// NoError asserts that a function returned a nil error (ie. no error). +// NoError asserts that a function returned a nil error (i.e. no error). // // # Usage // @@ -51,7 +51,7 @@ func NoError(t T, err error, msgAndArgs ...any) bool { return true } -// Error asserts that a function returned a non-nil error (ie. an error). +// Error asserts that a function returned a non-nil error (i.e. an error). // // # Usage // diff --git a/internal/assertions/number.go b/internal/assertions/number.go index b1436efdc..e8a2cd367 100644 --- a/internal/assertions/number.go +++ b/internal/assertions/number.go @@ -15,10 +15,10 @@ import ( // Delta must be greater than or equal to zero. // // Expected and actual values should convert to float64. -// To compare large integers that can't be represented accurately as float64 (eg. uint64), +// To compare large integers that can't be represented accurately as float64 (e.g. uint64), // prefer [InDeltaT] to preserve the original type. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -68,7 +68,7 @@ func InDelta(t T, expected, actual any, delta float64, msgAndArgs ...any) bool { // // Delta must be greater than or equal to zero. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -117,7 +117,7 @@ func InDeltaT[Number Measurable](t T, expected, actual, delta Number, msgAndArgs // InEpsilon asserts that expected and actual have a relative error less than epsilon. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -174,7 +174,7 @@ func InEpsilon(t T, expected, actual any, epsilon float64, msgAndArgs ...any) bo // Unlike [InDeltaT], which preserves the original type, [InEpsilonT] converts the expected and actual // numbers to float64, since the relative error doesn't make sense as an integer. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf diff --git a/require/require_assertions.go b/require/require_assertions.go index 9598f5c63..dc2171d73 100644 --- a/require/require_assertions.go +++ b/require/require_assertions.go @@ -339,7 +339,7 @@ func EqualValues(t T, expected any, actual any, msgAndArgs ...any) { t.FailNow() } -// Error asserts that a function returned a non-nil error (ie. an error). +// Error asserts that a function returned a non-nil error (i.e. an error). // // # Usage // @@ -1049,10 +1049,10 @@ func Implements(t T, interfaceObject any, object any, msgAndArgs ...any) { // Delta must be greater than or equal to zero. // // Expected and actual values should convert to float64. -// To compare large integers that can't be represented accurately as float64 (eg. uint64), +// To compare large integers that can't be represented accurately as float64 (e.g. uint64), // prefer [InDeltaT] to preserve the original type. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1137,7 +1137,7 @@ func InDeltaSlice(t T, expected any, actual any, delta float64, msgAndArgs ...an // // Delta must be greater than or equal to zero. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1166,7 +1166,7 @@ func InDeltaT[Number Measurable](t T, expected Number, actual Number, delta Numb // InEpsilon asserts that expected and actual have a relative error less than epsilon. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -1234,7 +1234,7 @@ func InEpsilonSlice(t T, expected any, actual any, epsilon float64, msgAndArgs . // Unlike [InDeltaT], which preserves the original type, [InEpsilonT] converts the expected and actual // numbers to float64, since the relative error doesn't make sense as an integer. // -// # Behavior with IEEE floating point arithmetics +// # Behavior with IEEE floating point arithmetic // // - expected NaN is matched only by a NaN, e.g. this works: InDeltaT(math.NaN(), math.Sqrt(-1), 0.0) // - expected +Inf is matched only by a +Inf @@ -2047,7 +2047,7 @@ func Nil(t T, object any, msgAndArgs ...any) { t.FailNow() } -// NoError asserts that a function returned a nil error (ie. no error). +// NoError asserts that a function returned a nil error (i.e. no error). // // # Usage //