Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .mdsf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"$schema": "https://raw.githubusercontent.com/hougesen/mdsf/main/schemas/v0.11.1/mdsf.schema.json",
"format_finished_document": false,
"languages": {
"go": "golangci-lint:fmt",
"shell": "shfmt"
},
"language_aliases": {
"sh": "shell",
"cmd": "shell",
"bash": "shell"
}
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ thus reducing their dependencies footprint.

Go-swagger will be adapted over Q1 2026.

Features will probably be added to support our main use cases there.
Features will be added to support our main use cases there.

## Change log

Expand All @@ -144,6 +144,7 @@ distributed with this fork, including internalized libraries.
* [Motivations](https://go-openapi.github.io/testify/project/readme)
* [Roadmap][doc-roadmap]
* [Internal architecture](https://go-openapi.github.io/testify/project/maintainers/architecture)
* [Benchmarks](https://go-openapi.github.io/testify/project/maintainers/benchmarks)

* [All-time contributors](./CONTRIBUTORS.md)
* [Contributing guidelines](https://go-openapi.github.io/testify/project/contributing/)
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This policy outlines the commitment and practices of the go-openapi maintainers

| Version | Supported |
| ------- | ------------------ |
| 2.1.x | :white_check_mark: |
| 2.2.x | :white_check_mark: |

## Vulnerability checks in place

Expand Down
42 changes: 34 additions & 8 deletions assert/assert_assertions.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_assertions_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_examples_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_format_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_forward.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_forward_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_helpers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_helpers_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assert/assert_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 7 additions & 8 deletions assert/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,13 @@
// )
//
// func TestSomething(t *testing.T) {
//
// var a string = "Hello"
// var b string = "Hello"
//
// assert.Equal(t, a, b, "The two words should be the same.")
//
// }
//
// if you assert many times, use the format below:
// if you assert many times, you might find the format below more concise:
//
// import (
// "testing"
Expand All @@ -43,16 +41,17 @@
//
// # Assertions
//
// Assertions allow you to easily write test code.
// Assertions allow you to easily write test code using go's standard testing library.
//
// All assertion functions take as the first argument, the [*testing.T] object provided by the
// standard testing framework.
//
// This allows the assertion functions to write the failings and other details to the correct place.
// This allows the assertion functions to write their failings and other details to the correct place.
//
// Every assertion function also takes an optional string message as the final argument,
// Every assertion function takes an optional string message as the final argument,
// allowing custom error messages to be appended to the message the assertion method outputs.
//
// See [our doc site](https://go-openapi.github.io/testify/) for usage and examples and
// [go docs](https://pkg.go/dev/go-openapi/testify) for complete reference.
// See our doc site at https://go-openapi.github.io/testify/ for usage, examples and searchable reference.
//
// See https://pkg.go/dev/go-openapi/testify/ for complete reference.
package assert
2 changes: 1 addition & 1 deletion codegen/internal/generator/funcmaps/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
// This package contains all template helper functions used by both the code generator
// (for assert/require packages) and the documentation generator (for markdown docs).
//
// The main entry point is FuncMap(), which returns a complete template.FuncMap
// The main entry point is [FuncMap], which returns a complete [template.FuncMap]
// with all available functions registered.
package funcmaps
14 changes: 14 additions & 0 deletions codegen/internal/generator/funcmaps/funcmaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ func FuncMap() template.FuncMap {
"sourceLink": sourceLink,
"titleize": titleize,
"slugize": slugize,
"blockquote": blockquote,
}
}

Expand Down Expand Up @@ -364,3 +365,16 @@ func slugize(in string) string {
in,
))
}

// blockquote prints a text as a markdown blockquote.
func blockquote(in string) string {
result := make([]string, 0, sensiblePrealloc)
for line := range strings.SplitSeq(in, "\n") {
result = append(result, "> "+line)
if strings.HasSuffix(line, ".") {
result = append(result, ">")
}
}

return strings.Join(result, "\n")
}
Loading
Loading