This commit is contained in:
13
e2e/go/helpers_test.go
generated
Normal file
13
e2e/go/helpers_test.go
generated
Normal file
@@ -0,0 +1,13 @@
|
||||
package e2e_test
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// jsonString converts a value to its JSON string representation.
|
||||
// Array fields use jsonString instead of fmt.Sprint to preserve structure.
|
||||
func jsonString(value any) string {
|
||||
encoded, err := json.Marshal(value)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
return string(encoded)
|
||||
}
|
||||
Reference in New Issue
Block a user