MCPcopy Index your code
hub / github.com/devspace-sh/devspace / NormalizeNewlines

Function NormalizeNewlines

pkg/util/dockerfile/get.go:90–96  ·  view source on GitHub ↗

NormalizeNewlines normalizes \r\n (windows) and \r (mac) into \n (unix)

(d []byte)

Source from the content-addressed store, hash-verified

88// NormalizeNewlines normalizes \r\n (windows) and \r (mac)
89// into \n (unix)
90func NormalizeNewlines(d []byte) []byte {
91 // replace CR LF \r\n (windows) with LF \n (unix)
92 d = bytes.Replace(d, []byte{13, 10}, []byte{10}, -1)
93 // replace CF \r (mac) with LF \n (unix)
94 d = bytes.Replace(d, []byte{13}, []byte{10}, -1)
95 return d
96}

Callers 1

GetPortsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected