summaryrefslogtreecommitdiff
path: root/experiments
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-25 11:35:55 -0400
committerPietro Gagliardi <[email protected]>2014-05-25 11:35:55 -0400
commit5583dee743f8b47e9dd04ecd24bde6950d1eca14 (patch)
treeac82c40619ddbc35c0881de2ed26458f4ba98f6a /experiments
parenteb0188a0999b7a7c1746b06a6c22e147cf3f1ac6 (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).
Diffstat (limited to 'experiments')
-rw-r--r--experiments/windowsconstgen.go9
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