Created
October 20, 2014 13:31
-
-
Save g-dormoy/700c7c6946bc87f7f3f0 to your computer and use it in GitHub Desktop.
How to concate in GO / demo http://play.golang.org/p/rOYJG7TTz6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
import "bytes" | |
func main() { | |
list := []string{"foo", "bar"} | |
var str bytes.Buffer | |
for _, l := range list { | |
str.WriteString(l) | |
} | |
fmt.Println(str.String()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment