diff options
| author | Pietro Gagliardi <[email protected]> | 2014-05-25 11:35:55 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-05-25 11:35:55 -0400 |
| commit | 5583dee743f8b47e9dd04ecd24bde6950d1eca14 (patch) | |
| tree | ac82c40619ddbc35c0881de2ed26458f4ba98f6a | |
| parent | eb0188a0999b7a7c1746b06a6c22e147cf3f1ac6 (diff) | |
Updated the Windows constants generator to warn against variables that haven't been converted to constants (in case I forget I ever did this).
| -rw-r--r-- | experiments/windowsconstgen.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/experiments/windowsconstgen.go b/experiments/windowsconstgen.go index 4ee1d76..05260cf 100644 --- a/experiments/windowsconstgen.go +++ b/experiments/windowsconstgen.go @@ -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 |
