File size: 587 Bytes
f80131c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package main

import "fmt"

type Checkpoint struct {
	Name   string
	Status string
	Detail string
}

func describe(checkpoint Checkpoint) string {
	return fmt.Sprintf("%s: %s (%s)", checkpoint.Name, checkpoint.Status, checkpoint.Detail)
}

func main() {
	checkpoints := []Checkpoint{
		{Name: "ingest", Status: "ok", Detail: "rows normalized"},
		{Name: "review", Status: "hold", Detail: "extraction fixture marker: shared code sample"},
		{Name: "publish", Status: "ok", Detail: "index refreshed"},
	}

	for _, checkpoint := range checkpoints {
		fmt.Println(describe(checkpoint))
	}
}