Newer
Older
pokemon-go-trade / vendor / github.com / hashicorp / hcl / testhelper / unix2dos.go
Simon Lindgren on 12 Feb 2021 235 bytes first commit
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)
}