Compare commits

..

No commits in common. "3565618335b1788bd00a99e4176902a77b798a82" and "d5669a4eb56091eb5ae84fd4e285fd76e0eb3260" have entirely different histories.

2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,7 @@
- [(FR) - Layers](./fr/references/layers/README.md) - [(FR) - Layers](./fr/references/layers/README.md)
- [(FR) - Métriques](./fr/references/metrics.md) - [(FR) - Métriques](./fr/references/metrics.md)
- [(FR) - Configuration](./fr/references/configuration.md) - [(FR) - Fichier de configuration](./fr/references/configuration.md)
- [(FR) - API d'administration](./fr/references/admin_api.md) - [(FR) - API d'administration](./fr/references/admin_api.md)
## Tutoriels ## Tutoriels

View File

@ -2,6 +2,7 @@ package config
import ( import (
"os" "os"
"regexp"
"strconv" "strconv"
"time" "time"
@ -10,6 +11,9 @@ import (
"gopkg.in/yaml.v3" "gopkg.in/yaml.v3"
) )
// var reVar = regexp.MustCompile(`^\${(\w+)}$`)
var reVar = regexp.MustCompile(`\${(.*?)}`)
type InterpolatedString string type InterpolatedString string
func (is *InterpolatedString) UnmarshalYAML(value *yaml.Node) error { func (is *InterpolatedString) UnmarshalYAML(value *yaml.Node) error {
@ -67,7 +71,7 @@ func (ifl *InterpolatedFloat) UnmarshalYAML(value *yaml.Node) error {
return errors.WithStack(err) return errors.WithStack(err)
} }
floatVal, err := strconv.ParseFloat(str, 32) floatVal, err := strconv.ParseFloat(str, 10)
if err != nil { if err != nil {
return errors.Wrapf(err, "could not parse float '%v', line '%d'", str, value.Line) return errors.Wrapf(err, "could not parse float '%v', line '%d'", str, value.Line)
} }