diff options
| author | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-10 17:01:42 -0400 |
|---|---|---|
| committer | Andrew Gallant (Ocelot) <[email protected]> | 2012-05-10 17:01:42 -0400 |
| commit | b618b2ea09167306cfe29b6966faf184bc893c2d (patch) | |
| tree | ebd8b505ebd83db1b891bc7a7f70d75f26e581e6 /xgb_help.go | |
| parent | b10760ea62c5c071496a71d1d9ab6752989a309f (diff) | |
a huge commit. splitting extensions into their own sub-packages.
Diffstat (limited to 'xgb_help.go')
| -rw-r--r-- | xgb_help.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/xgb_help.go b/xgb_help.go index 6c3b40a..36fe98b 100644 --- a/xgb_help.go +++ b/xgb_help.go @@ -5,30 +5,30 @@ import ( "strings" ) -// stringsJoin is an alias to strings.Join. It allows us to avoid having to +// StringsJoin is an alias to strings.Join. It allows us to avoid having to // import 'strings' in each of the generated Go files. -func stringsJoin(ss []string, sep string) string { +func StringsJoin(ss []string, sep string) string { return strings.Join(ss, sep) } -// sprintf is so we don't need to import 'fmt' in the generated Go files. -func sprintf(format string, v ...interface{}) string { +// Sprintf is so we don't need to import 'fmt' in the generated Go files. +func Sprintf(format string, v ...interface{}) string { return fmt.Sprintf(format, v...) } -// errorf is just a wrapper for fmt.Errorf. Exists for the same reason +// Errorf is just a wrapper for fmt.Errorf. Exists for the same reason // that 'stringsJoin' and 'sprintf' exists. -func errorf(format string, v ...interface{}) error { +func Errorf(format string, v ...interface{}) error { return fmt.Errorf(format, v...) } // Pad a length to align on 4 bytes. -func pad(n int) int { +func Pad(n int) int { return (n + 3) & ^3 } // popCount counts the number of bits set in a value list mask. -func popCount(mask0 int) int { +func PopCount(mask0 int) int { mask := uint32(mask0) n := 0 for i := uint32(0); i < 32; i++ { |
