Skip to content

Commit f2228ef

Browse files
authored
Fix code snippets in README (#2)
1 parent 125b675 commit f2228ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ a, b := tup.Values()
6262
Tuples implement the `Stringer` and `GoStringer` interfaces.
6363

6464
```go
65-
fmt.Println("%s", tuple.New2("hello", "world"))
65+
fmt.Printf("%s\n", tuple.New2("hello", "world"))
6666
// Output:
6767
// ["hello" "world"]
6868

69-
fmt.Println("%#v", tuple.New2("hello", "world"))
69+
fmt.Printf("%#v\n", tuple.New2("hello", "world"))
7070
// Output:
7171
// tuple.T2[string, string]{V1: "hello", V2: "world"}
7272
```
7373

7474
# Notes
7575

76-
The tuples code and test code are generated by the `scripts/gen/main.go` script.
76+
The tuple code and test code are generated by the `scripts/gen/main.go` script.
7777

78-
The generation works by reading `tuple.tpl` and `tuple_test.tpl` using Go's `text/template` engine.
79-
`tuple.tpl` and `tuple_test.tpl` detail the templated content of a generic tuple class, with variable number of elements.
78+
Generation works by reading `tuple.tpl` and `tuple_test.tpl` using Go's `text/template` engine.
79+
`tuple.tpl` and `tuple_test.tpl` contain the templated content of a generic tuple class, with variable number of elements.
8080

8181
# Contributing
8282

0 commit comments

Comments
 (0)