Trying to replace windows line ending using strings.Replace
:
package main
import (
"fmt"
"strings"
)
var hw string = "hello
world"
func main() {
fmt.Println(hw)
strings.Replace(hw, "
", " ", -1)
fmt.Println(hw)
}
I suppose it is something very simple I am missing but not sure why the above does not work.