This repository has been archived on 2019-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
mumbledj/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go
2016-06-20 17:50:40 -07:00

15 lines
234 B
Go

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)
}