Golang élimine les espaces en double

space := regexp.MustCompile(`\s+`)
str := space.ReplaceAllString("Hello  \t \n world!", " ")
fmt.Println(str) // "Hello world!"
Curious Cobra