mirror of
https://github.com/luxfi/czmq.git
synced 2026-10-30 16:59:02 +00:00
Modules declare go 1.27.1 and the build images follow. go fix applied the modernizers: any, strings.Builder and range over int, in both modules. Co-authored-by: Hanzo Dev <[email protected]>
20 lines
400 B
Go
20 lines
400 B
Go
package czmq
|
|
|
|
import (
|
|
"fmt"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func assertEqual(t *testing.T, expected any, value any, message ...string) {
|
|
if expected == value {
|
|
return
|
|
}
|
|
var msg strings.Builder
|
|
msg.WriteString(fmt.Sprintf("'%v' != '%v'. Expected '%v' but got '%v'", expected, value, expected, value))
|
|
for _, m := range message {
|
|
msg.WriteString(fmt.Sprintf(". %s", m))
|
|
}
|
|
t.Fatal(msg.String())
|
|
}
|