summaryrefslogtreecommitdiff
path: root/util.go
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@code.google.com>2013-11-15 08:04:58 -0500
committerKurt Jung <kurt.w.jung@code.google.com>2013-11-15 08:04:58 -0500
commit807441a526f9094d3c099d422542252a4a0ec964 (patch)
treee052b014f848ea09953116449a1c6dfdeab07d44 /util.go
parent18a535033a6b0b584b7fb1bb6a21a7c980207aa4 (diff)
Brush some lint off using github.com/golang/lint. This includes one breaking change: WriteLinkID instead of WriteLinkId.
Diffstat (limited to 'util.go')
-rw-r--r--util.go9
1 files changed, 3 insertions, 6 deletions
diff --git a/util.go b/util.go
index 08b9503..b07a37d 100644
--- a/util.go
+++ b/util.go
@@ -28,9 +28,8 @@ import (
func round(f float64) int {
if f < 0 {
return -int(math.Floor(-f + 0.5))
- } else {
- return int(math.Floor(f + 0.5))
}
+ return int(math.Floor(f + 0.5))
}
func sprintf(fmtStr string, args ...interface{}) string {
@@ -131,18 +130,16 @@ func utf8toutf16(s string) string {
func intIf(cnd bool, a, b int) int {
if cnd {
return a
- } else {
- return b
}
+ return b
}
// Return aStr if cnd is true, otherwise bStr
func strIf(cnd bool, aStr, bStr string) string {
if cnd {
return aStr
- } else {
- return bStr
}
+ return bStr
}
// Dump the internals of the specified values