...

Source file src/github.com/hashicorp/hcl/testhelper/unix2dos.go

Documentation: github.com/hashicorp/hcl/testhelper

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

View as plain text