INNER CODE UNIT · Go

FullNameToHeadingLink

kubernetes-sigs/gateway-api · tools/implist/main.go:61

func FullNameToHeadingLink(fullName string) string {
	// Spaces to dash
	out := strings.ReplaceAll(fullName, " ", "-")
	// Remove all hashes
	out = strings.ReplaceAll(out, "#", "")
	// Add the hash prefix
	out = "#" + out
	// Make sure it's lower case
	return strings.ToLower(out)
}

func main() {
	flag.StringVar(&ImplsDir, "d", "conformance/list/implementations", "Defines the path relative to the repo root of the list directory containing the details files for implementations")
	flag.StringVar(&IntegrationsDir, "i", "conformance/list/integrations", "Defines the path relative to the repo root of the list directory containing the details files for integrations")
	flag.StringVar(&ReportsDir, "r", "conformance/reports", "Defines the path relative to the repo root of the list directory containing the conformance reports")
	flag.StringVar(&OutFile, "o", "site/content/en/docs/implementations/list.md", "Defines the path relative to the repo root of the output file")

	flag.Parse()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…