OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / hashicorp / hcl / testhelper / unix2dos.go
1 package testhelper
2
3 import (
4         "runtime"
5         "strings"
6 )
7
8 // Converts the line endings when on Windows
9 func Unix2dos(unix string) string {
10         if runtime.GOOS != "windows" {
11                 return unix
12         }
13
14         return strings.Replace(unix, "\n", "\r\n", -1)
15 }