carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package fixture
2
3// Not compiled: testdata is ignored by the go tool.
4
5import "strings"
6
7// render is a helper the gate does not read. A correct join elsewhere in
8// this file must not answer for it.
9func render(names []string) string { return strings.Join(names, ", ") }
10
11// MV-N1
12func differs(names []string) string {
13 return "the environment differs from the source's: " + render(names)
14}
15
16// MV-N2: nothing calls it.
17func storeDiffers(list string) string {
18 return "the store differs from the source's: " + list
19}
20
21// MV-N3: one caller, through a local variable.
22func zoneLine(list string) string { return "the zones that answered: " + list }
23
24func zones(zs []string) string {
25 joined := strings.Join(zs, ", ")
26 return zoneLine(joined)
27}
28
29// MV-N4: two callers; the second joins with " or ".
30func regionLine(list string) string { return "the regions that answered: " + list }
31
32func regions(rs []string) string { return regionLine(strings.Join(rs, ", ")) }
33
34func regionsOr(rs []string) string { return regionLine(strings.Join(rs, " or ")) }
35