mirror of
https://github.com/eosswedenorg/thalos
synced 2026-06-20 09:56:47 +02:00
app/types/size.go: Add UnmarshalText
This commit is contained in:
parent
59480533d3
commit
d43ef7f7ff
1 changed files with 4 additions and 0 deletions
|
|
@ -34,3 +34,7 @@ func (s Size) String() string {
|
||||||
func (s *Size) UnmarshalYAML(value *yaml.Node) error {
|
func (s *Size) UnmarshalYAML(value *yaml.Node) error {
|
||||||
return s.Parse(value.Value)
|
return s.Parse(value.Value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *Size) UnmarshalText(text []byte) error {
|
||||||
|
return s.Parse(string(text))
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue