Skip to content

Commit

Permalink
docs: fix example code (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
orisano authored and elliotchance committed Apr 28, 2019
1 parent 0f7b10c commit a1ae87f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ These can be used without needing `go generate`. For example:
package main

import (
"github.com/elliotchance/pie/pie"
"fmt"
"strings"

"github.com/elliotchance/pie/pie"
)

func main() {
name := pie.Strings{"Bob", "Sally", "John", "Jane"}.
Unselect(func (name string) {
Unselect(func (name string) bool {
return strings.HasPrefix(name, "J")
}).
Transform(strings.ToUpper).
Expand Down

0 comments on commit a1ae87f

Please sign in to comment.