komem3 / alphabetical

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alphabetical

Check function call and variable declarations are in alphabetical order. The target is the statement with // Alphabetical order comments.

// Alphabetical order
var (
	Banana = "banana"
	Apple  = "apple" // want "not sort by alphabetical"
)

func f() {
	http.HandleFunc("/z", nil)

	// Alphabetical order
	http.HandleFunc("/b", nil)
	http.HandleFunc("/a", nil) // want "not sort by alphabetical"

	// Alphabetical order
	b(nil, nil)
	a(nil, nil) // want "not sort by alphabetical"
}

About

License:MIT License


Languages

Language:Go 100.0%