diff options
author | Gabriel Aszalos <gabriel.aszalos@gmail.com> | 2017-09-19 14:25:21 +0200 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2017-09-19 13:14:30 +0000 |
commit | 1caafe26a32b5423a75df95e4c3e9ccd2c3a27d3 (patch) | |
tree | 1a1ce3f5bca964fa4138db6d606f27281f648b42 /content/go-slices-usage-and-internals.article | |
parent | 3669720e37cee135644b4f1ade2c55954ad23730 (diff) |
content: correct mistake in "Slices" article
Change-Id: Ie994d952ff94f05c63fc63389ec359d3e9a902e9
Reviewed-on: https://go-review.googlesource.com/64590
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'content/go-slices-usage-and-internals.article')
-rw-r--r-- | content/go-slices-usage-and-internals.article | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/content/go-slices-usage-and-internals.article b/content/go-slices-usage-and-internals.article index d4a50fd..4ba1365 100644 --- a/content/go-slices-usage-and-internals.article +++ b/content/go-slices-usage-and-internals.article @@ -190,7 +190,7 @@ To append one slice to another, use `...` to expand the second argument to a lis Since the zero value of a slice (`nil`) acts like a zero-length slice, you can declare a slice variable and then append to it in a loop: // Filter returns a new slice holding only - // the elements of s that satisfy f() + // the elements of s that satisfy fn() func Filter(s []int, fn func(int) bool) []int { var p []int // == nil for _, v := range s { |