package main

import "strings"

func main(){
	a := "hahaha"
	b := "hehehe"
	c := strings.Join([]string{a,b},",")
	println(c)
}

主要结论

strings.Join()buffer.WriteString()fmt.Sprintf

 

 建议参考下面博文,讲得特别清楚,将多种拼接方法都对比地讲述了一遍: