github.com/kata-containers/tests@v0.0.0-20240307153542-772105b56064/cmd/check-markdown/record.go (about) 1 // Copyright (c) 2019 Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 // 5 6 package main 7 8 import "fmt" 9 10 func linkHeaderRecord() []string { 11 return []string{ 12 "Document", 13 "Address", 14 "Path", 15 "Description", 16 "Type", 17 } 18 } 19 20 func linkToRecord(l Link) (record []string) { 21 record = append(record, l.Doc.Name) 22 record = append(record, l.Address) 23 record = append(record, l.ResolvedPath) 24 record = append(record, l.Description) 25 record = append(record, l.Type.String()) 26 27 return record 28 } 29 30 func headingHeaderRecord() []string { 31 return []string{ 32 "Name", 33 "Link", 34 "Level", 35 } 36 } 37 func headingToRecord(h Heading) (record []string) { 38 record = append(record, h.Name) 39 record = append(record, h.LinkName) 40 record = append(record, fmt.Sprintf("%d", h.Level)) 41 42 return record 43 }