Skip to content

Instantly share code, notes, and snippets.

@tlianza
Created August 10, 2015 03:05
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 tlianza/210027922a86a67015a1 to your computer and use it in GitHub Desktop.
Save tlianza/210027922a86a67015a1 to your computer and use it in GitHub Desktop.
golang array string join
// http://golang.org/pkg/strings/#Join
package main
import (
"fmt"
"strings"
)
func main() {
s := []string{"foo", "bar", "baz"}
fmt.Println(strings.Join(s, ", "))
}
@sebastianwebber
Copy link

Hi there,

This is not a array, but a slice.

Please, take a look:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment