1、+号 func main() { s1 := "hello" s2 := "word" s3 := s1 + s2 fmt.Print(s3) //s3 = "helloword" } go语言用+拼接,php使用.拼接,不过由于golang中的字符串是不可变的类型,因此用 + 连接会产生一个新的字符串对效率有影响。 2、sprintf函数 s1 := "hello" s2 := "word" s3 := fmt.Sprintf