INNER CODE UNIT · Go

main

jesseduffield/lazygit · cmd/author_colors_repo/main.go:62

func main() {
	if len(os.Args) != 2 {
		log.Fatalf("usage: %s <path>", os.Args[0])
	}
	path := os.Args[1]
	if _, err := os.Stat(path); err == nil {
		log.Fatalf("%s already exists", path)
	}

	extremes := []extreme{lowest, highest}
	commits := make([]commit, 0, len(extremes)*len(extremes)*numHues)
	for _, lightness := range extremes {
		for _, saturation := range extremes {
			for i := range numHues {
				hue := float64(i) / numHues
				author, actualHue := findAuthor(lightness, saturation, hue)
				subject := fmt.Sprintf("lightness %s, saturation %s, hue %.0f°", lightness, saturation, actualHue*360)
				commits = append(commits, commit{author: author, subject: subject})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…