2016-03-20 23:14:42 +00:00
|
|
|
package testhelper
|
|
|
|
|
|
|
|
import (
|
|
|
|
"runtime"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Converts the line endings when on Windows
|
|
|
|
func Unix2dos(unix string) string {
|
|
|
|
if runtime.GOOS != "windows" {
|
|
|
|
return unix
|
|
|
|
}
|
|
|
|
|
|
|
|
return strings.Replace(unix, "\n", "\r\n", -1)
|
2016-07-22 17:13:27 +00:00
|
|
|
}
|