Compare commits
2 Commits
d5669a4eb5
...
3565618335
Author | SHA1 | Date |
---|---|---|
wpetit | 3565618335 | |
wpetit | 64ca8fe1e4 |
|
@ -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) - Fichier de configuration](./fr/references/configuration.md)
|
- [(FR) - 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
|
||||||
|
|
|
@ -2,7 +2,6 @@ package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"os"
|
"os"
|
||||||
"regexp"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -11,9 +10,6 @@ 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 {
|
||||||
|
@ -71,7 +67,7 @@ func (ifl *InterpolatedFloat) UnmarshalYAML(value *yaml.Node) error {
|
||||||
return errors.WithStack(err)
|
return errors.WithStack(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
floatVal, err := strconv.ParseFloat(str, 10)
|
floatVal, err := strconv.ParseFloat(str, 32)
|
||||||
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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue