forked from kata-containers/tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
record.go
43 lines (36 loc) · 783 Bytes
/
record.go
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2019 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import "fmt"
func linkHeaderRecord() []string {
return []string{
"Document",
"Address",
"Path",
"Description",
"Type",
}
}
func linkToRecord(l Link) (record []string) {
record = append(record, l.Doc.Name)
record = append(record, l.Address)
record = append(record, l.ResolvedPath)
record = append(record, l.Description)
record = append(record, l.Type.String())
return record
}
func headingHeaderRecord() []string {
return []string{
"Name",
"Link",
"Level",
}
}
func headingToRecord(h Heading) (record []string) {
record = append(record, h.Name)
record = append(record, h.LinkName)
record = append(record, fmt.Sprintf("%d", h.Level))
return record
}