From: Martin Möhrmann Date: Mon, 14 Aug 2017 19:12:49 +0000 (+0200) Subject: strings: use slice instead of list and array in Fields comment X-Git-Tag: go1.10beta1~1590 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=d180d18666e355b52bf12126119416f6b3c6e843;p=gostls13.git strings: use slice instead of list and array in Fields comment Change-Id: I70b839ff0ae5f015587390a82616ebb1d657d71a Reviewed-on: https://go-review.googlesource.com/55490 Reviewed-by: Joe Tsai Run-TryBot: Martin Möhrmann TryBot-Result: Gobot Gobot --- diff --git a/src/strings/strings.go b/src/strings/strings.go index 099fb8031b..caabc5affd 100644 --- a/src/strings/strings.go +++ b/src/strings/strings.go @@ -310,8 +310,8 @@ func SplitAfter(s, sep string) []string { var asciiSpace = [256]uint8{'\t': 1, '\n': 1, '\v': 1, '\f': 1, '\r': 1, ' ': 1} // Fields splits the string s around each instance of one or more consecutive white space -// characters, as defined by unicode.IsSpace, returning an array of substrings of s or an -// empty list if s contains only white space. +// characters, as defined by unicode.IsSpace, returning a slice of substrings of s or an +// empty slice if s contains only white space. func Fields(s string) []string { // First count the fields. // This is an exact count if s is ASCII, otherwise it is an approximation.