Skip to content

Instantly share code, notes, and snippets.

@g-dormoy
Created October 20, 2014 13:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save g-dormoy/700c7c6946bc87f7f3f0 to your computer and use it in GitHub Desktop.
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
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