mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
Reduce binary size vs locale, update to CLDR v36.1
Test building with `go build -ldflags="-s -w"` Hugo 0.86.2: 46MB Before this commit: 77MB After this commit: 54MB Fixes #8839 Fixes #8841
This commit is contained in:
@@ -20,8 +20,8 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
translators "github.com/bep/gotranslators"
|
||||
"github.com/go-playground/locales"
|
||||
translators "github.com/gohugoio/localescompressed"
|
||||
"github.com/gohugoio/locales"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/gohugoio/hugo/deps"
|
||||
@@ -186,7 +186,7 @@ func (ns *Namespace) FormatNumberCustom(precision, number interface{}, options .
|
||||
exp := math.Pow(10.0, float64(prec))
|
||||
r := math.Round(n*exp) / exp
|
||||
|
||||
// Logic from MIT Licensed github.com/go-playground/locales/
|
||||
// Logic from MIT Licensed github.com/gohugoio/locales/
|
||||
// Original Copyright (c) 2016 Go Playground
|
||||
|
||||
s := strconv.FormatFloat(math.Abs(r), 'f', prec, 64)
|
||||
|
Reference in New Issue
Block a user