1
0
mirror of https://github.com/golang/go synced 2024-11-26 13:58:48 -07:00

To get an empty string, return an empty string, not 0.

R=rsc
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=15858
CL=15860
This commit is contained in:
Ian Lance Taylor 2008-09-25 10:51:23 -07:00
parent 2a19d7dc42
commit 99ec031391

View File

@ -87,7 +87,7 @@ export func split(s, sep string) *[]string {
// Join list of strings with separators between them.
export func join(a *[]string, sep string) string {
if len(a) == 0 {
return 0
return ""
}
if len(a) == 1 {
return a[0]