Skip to content

Commit

Permalink
Test: Make CR visible
Browse files Browse the repository at this point in the history
  • Loading branch information
earthboundkid committed Nov 21, 2024
1 parent f71cbfa commit 08a11e1
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions config_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,22 @@ func ExampleBodyMultipart() {
panic(err)
}

fmt.Println(strings.ReplaceAll(string(b), "\r", ""))
// Make carriage return visible
fmt.Println(strings.ReplaceAll(string(b), "\r", "↵"))
// Output:
// POST / HTTP/1.1
// Host: example.com
// Content-Type: multipart/form-data; boundary=abc
//
// --abc
// Content-Disposition: form-data; name="file"; filename="en.txt"
// Content-Type: application/octet-stream
//
// Hello, World!
// --abc
// Content-Disposition: form-data; name="file"; filename="jp.txt"
// Content-Type: text/plain; charset=utf-8
//
// こんにちは世界!
// --abc--
// POST / HTTP/1.1
// Host: example.com
// Content-Type: multipart/form-data; boundary=abc
//
// --abc
// Content-Disposition: form-data; name="file"; filename="en.txt"
// Content-Type: application/octet-stream
//
// Hello, World!
// --abc
// Content-Disposition: form-data; name="file"; filename="jp.txt"
// Content-Type: text/plain; charset=utf-8
//
// こんにちは世界!
// --abc--
}

0 comments on commit 08a11e1

Please sign in to comment.