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/tpl/math
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-02 15:23:25 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-12-03 15:12:58 +0300
commitd90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch)
tree7b1b14464eefec1188ca2eed53c64e4823453cc9 /tpl/math
parent32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff)
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'tpl/math')
-rw-r--r--tpl/math/init.go1
-rw-r--r--tpl/math/math.go2
-rw-r--r--tpl/math/math_test.go1
3 files changed, 0 insertions, 4 deletions
diff --git a/tpl/math/init.go b/tpl/math/init.go
index e7f9114ba..ddbd2fc73 100644
--- a/tpl/math/init.go
+++ b/tpl/math/init.go
@@ -114,7 +114,6 @@ func init() {
)
return ns
-
}
internal.AddTemplateFuncsNamespace(f)
diff --git a/tpl/math/math.go b/tpl/math/math.go
index ecaf61ebc..2b2497c3e 100644
--- a/tpl/math/math.go
+++ b/tpl/math/math.go
@@ -64,7 +64,6 @@ func (ns *Namespace) Floor(x interface{}) (float64, error) {
// Log returns the natural logarithm of a number.
func (ns *Namespace) Log(a interface{}) (float64, error) {
af, err := cast.ToFloat64E(a)
-
if err != nil {
return 0, errors.New("Log operator can't be used with non integer or float value")
}
@@ -76,7 +75,6 @@ func (ns *Namespace) Log(a interface{}) (float64, error) {
// NOTE: will return for NaN for negative values of a
func (ns *Namespace) Sqrt(a interface{}) (float64, error) {
af, err := cast.ToFloat64E(a)
-
if err != nil {
return 0, errors.New("Sqrt operator can't be used with non integer or float value")
}
diff --git a/tpl/math/math_test.go b/tpl/math/math_test.go
index c48f71837..da59d7938 100644
--- a/tpl/math/math_test.go
+++ b/tpl/math/math_test.go
@@ -197,7 +197,6 @@ func TestSqrt(t *testing.T) {
result, err := ns.Sqrt(-1)
c.Assert(err, qt.IsNil)
c.Assert(result, qt.Satisfies, math.IsNaN)
-
}
func TestMod(t *testing.T) {