From 54d3d47daf9190275bbdaf8703b84969a4593451 Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 24 Mar 2017 23:31:34 -0700 Subject: PLT-6076 Adding viper libs for config file changes (#5871) * Adding viper libs for config file changes * Removing the old fsnotify lib * updating some missing libs --- vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go (limited to 'vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go') diff --git a/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go b/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go new file mode 100644 index 000000000..827ac6f1e --- /dev/null +++ b/vendor/github.com/hashicorp/hcl/testhelper/unix2dos.go @@ -0,0 +1,15 @@ +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) +} -- cgit v1.2.3-1-g7c22