From 1caafe26a32b5423a75df95e4c3e9ccd2c3a27d3 Mon Sep 17 00:00:00 2001 From: Gabriel Aszalos Date: Tue, 19 Sep 2017 14:25:21 +0200 Subject: content: correct mistake in "Slices" article Change-Id: Ie994d952ff94f05c63fc63389ec359d3e9a902e9 Reviewed-on: https://go-review.googlesource.com/64590 Reviewed-by: Ian Lance Taylor --- content/go-slices-usage-and-internals.article | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'content/go-slices-usage-and-internals.article') 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 { -- cgit v1.2.3