move all files to common/ to begin repo merge

This commit is contained in:
Ethan Buchman
2017-04-18 16:33:22 -04:00
parent 5aecd32554
commit 356657a37b
22 changed files with 0 additions and 0 deletions

24
common/string.go Normal file
View File

@@ -0,0 +1,24 @@
package common
import (
"fmt"
"strings"
)
var Fmt = fmt.Sprintf
func RightPadString(s string, totalLength int) string {
remaining := totalLength - len(s)
if remaining > 0 {
s = s + strings.Repeat(" ", remaining)
}
return s
}
func LeftPadString(s string, totalLength int) string {
remaining := totalLength - len(s)
if remaining > 0 {
s = strings.Repeat(" ", remaining) + s
}
return s
}