Skip to content

Commit 0524586

Browse files
committed
Add trailing newlines to many of the 'hello world' examples
This makes them more curl-friendly.
1 parent bbb68ed commit 0524586

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

examples/hello.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"github.com/hoisie/web"
55
)
66

7-
func hello(val string) string { return "hello " + val }
7+
func hello(val string) string { return "hello " + val + "\n" }
88

99
func main() {
1010
web.Get("/(.*)", hello)

examples/logger.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"os"
77
)
88

9-
func hello(val string) string { return "hello " + val }
9+
func hello(val string) string { return "hello " + val + "\n" }
1010

1111
func main() {
1212
f, err := os.Create("server.log")

examples/multiserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"github.com/hoisie/web"
55
)
66

7-
func hello1(val string) string { return "hello1 " + val }
7+
func hello1(val string) string { return "hello1 " + val + "\n" }
88

9-
func hello2(val string) string { return "hello2 " + val }
9+
func hello2(val string) string { return "hello2 " + val + "\n" }
1010

1111
func main() {
1212
var server1 web.Server

examples/tls.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ gWrxykqyLToIiAuL+pvC3Jv8IOPIiVFsY032rOqcwSGdVUyhTsG28+7KnR6744tM
4747
-----END CERTIFICATE-----
4848
`
4949

50-
func hello(val string) string { return "hello " + val }
50+
func hello(val string) string { return "hello " + val + "\n" }
5151

5252
func main() {
5353
config := tls.Config{

0 commit comments

Comments
 (0)