aboutsummaryrefslogtreecommitdiff
path: root/nexgb/xgbgen/misc.go
diff options
context:
space:
mode:
authorAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-06 02:21:31 -0400
committerAndrew Gallant (Ocelot) <Andrew.Gallant@tufts.edu>2012-05-06 02:21:31 -0400
commit18b2d420b092d71313f0c05210c3038ff32483e7 (patch)
treee934f6bddd11863e82d591fb2a168d60be382f9d /nexgb/xgbgen/misc.go
parent99bc76de54729df5494faa944d4da96a8885d51e (diff)
downloadhaven-18b2d420b092d71313f0c05210c3038ff32483e7.tar.gz
haven-18b2d420b092d71313f0c05210c3038ff32483e7.tar.xz
haven-18b2d420b092d71313f0c05210c3038ff32483e7.zip
added documentation and did some slight restructuring. it's party time.
Diffstat (limited to 'nexgb/xgbgen/misc.go')
-rw-r--r--nexgb/xgbgen/misc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/nexgb/xgbgen/misc.go b/nexgb/xgbgen/misc.go
index 13c4cc2..85d788f 100644
--- a/nexgb/xgbgen/misc.go
+++ b/nexgb/xgbgen/misc.go
@@ -7,7 +7,7 @@ import (
// AllCaps is a regex to test if a string identifier is made of
// all upper case letters.
-var AllCaps = regexp.MustCompile("^[A-Z0-9]+$")
+var allCaps = regexp.MustCompile("^[A-Z0-9]+$")
// popCount counts number of bits 'set' in mask.
func popCount(mask uint) uint {
@@ -30,7 +30,7 @@ func pad(n int) int {
// first letter of each chunk, and smushes'em back together.
func splitAndTitle(s string) string {
// If the string is all caps, lower it and capitalize first letter.
- if AllCaps.MatchString(s) {
+ if allCaps.MatchString(s) {
return strings.Title(strings.ToLower(s))
}