Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join concatenates the elements of its first argument to create a single string. The separator string sep is placed between elements in the resulting string.
Disclaimer: Use this function judiciously.
Example (Interfaces) ¶
fmt.Println(Join([]interface{}{"a", "b", "c"}, ","))
Output: a,b,c
Example (Ints) ¶
fmt.Println(Join([]int{1, 2, 3}, ","))
Output: 1,2,3
Example (String) ¶
fmt.Println(Join("hello", ","))
Output: hello
Example (Strings) ¶
fmt.Println(Join([]string{"a", "b", "c"}, ","))
Output: a,b,c
Example (Struct) ¶
type Person struct { Name string } fmt.Println(Join(Person{Name: "Someone Else"}, ","))
Output: {Someone Else}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.