Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/hugo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-24 12:11:16 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2019-03-24 18:14:51 +0300
commitb5f39d23b86f9cb83c51da9fe4abb4c19c01c3b7 (patch)
treecf23180dc07698391cf47c2fe525755417729020 /common
parent3011f36c27ecde309325e6c75ca377f4f87fa97a (diff)
all: Apply staticcheck recommendations
Diffstat (limited to 'common')
-rw-r--r--common/math/math.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/common/math/math.go b/common/math/math.go
index 3c5ef1f9d..cd06379aa 100644
--- a/common/math/math.go
+++ b/common/math/math.go
@@ -46,7 +46,7 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) {
bu = 0
}
default:
- return nil, errors.New("Can't apply the operator to the values")
+ return nil, errors.New("can't apply the operator to the values")
}
case reflect.Float32, reflect.Float64:
af = av.Float()
@@ -58,7 +58,7 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) {
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
bf = float64(bv.Uint()) // may overflow
default:
- return nil, errors.New("Can't apply the operator to the values")
+ return nil, errors.New("can't apply the operator to the values")
}
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
au = av.Uint()
@@ -79,7 +79,7 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) {
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
bu = bv.Uint()
default:
- return nil, errors.New("Can't apply the operator to the values")
+ return nil, errors.New("can't apply the operator to the values")
}
case reflect.String:
as := av.String()
@@ -87,9 +87,9 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) {
bs := bv.String()
return as + bs, nil
}
- return nil, errors.New("Can't apply the operator to the values")
+ return nil, errors.New("can't apply the operator to the values")
default:
- return nil, errors.New("Can't apply the operator to the values")
+ return nil, errors.New("can't apply the operator to the values")
}
switch op {
@@ -128,8 +128,8 @@ func DoArithmetic(a, b interface{}, op rune) (interface{}, error) {
} else if bu != 0 {
return au / bu, nil
}
- return nil, errors.New("Can't divide the value by 0")
+ return nil, errors.New("can't divide the value by 0")
default:
- return nil, errors.New("There is no such an operation")
+ return nil, errors.New("there is no such an operation")
}
}