INNER CODE UNIT · Go

writeFile

OWASP/wrongsecrets · scripts/sort_contibutors/main.go:193

func writeFile(path, payload string) error {
	return os.WriteFile(path, []byte(payload), 0o600)
}

func renderMarkdown(users []Contributor, label string) string {
	var b strings.Builder
	b.WriteString(label)
	b.WriteString(":\n\n")
	for _, user := range users {
		fmt.Fprintf(&b, "- [%s @%s](https://www.github.com/%s)\n", user.Name, user.Username, user.Username)
	}
	b.WriteString("\n")
	return b.String()
}

func renderCreatedComment(date string) string {
	return fmt.Sprintf("<!-- Generated on %s -->\n\n", date)
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…