Updated the Windows constants generator to warn against variables that haven't been converted to constants (in case I forget I ever did this).
This commit is contained in:
parent
eb0188a099
commit
5583dee743
|
@ -97,11 +97,18 @@ func main() {
|
|||
|
||||
// keep sorted for git
|
||||
consts := make([]string, 0, len(known))
|
||||
vars := ""
|
||||
for ident, kind := range known {
|
||||
if kind == "const" || kind == "var" {
|
||||
if kind == "var" {
|
||||
vars += "\n" + ident
|
||||
}
|
||||
if kind == "const" {
|
||||
consts = append(consts, ident)
|
||||
}
|
||||
}
|
||||
if vars != "" {
|
||||
panic("error: the following are still unknown!" + vars) // has a newline already
|
||||
}
|
||||
sort.Strings(consts)
|
||||
|
||||
// thanks to james4k in irc.freenode.net/#go-nuts
|
||||
|
|
Loading…
Reference in New Issue