MCPcopy Create free account
hub / github.com/linuxkit/linuxkit / splitLines

Function splitLines

src/cmd/linuxkit/util.go:150–159  ·  view source on GitHub ↗

Convert a multi-line string into an array of strings

(in string)

Source from the content-addressed store, hash-verified

148
149// Convert a multi-line string into an array of strings
150func splitLines(in string) []string {
151 var res []string
152
153 s := bufio.NewScanner(strings.NewReader(in))
154 for s.Scan() {
155 res = append(res, s.Text())
156 }
157
158 return res
159}
160
161// This function parses the "size" parameter of a disk specification
162// and returns the size in MB. The "size" parameter defaults to GB, but

Callers 2

hypervChecksFunction · 0.85
hypervGetSwitchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected