all: Use new reflect based CLI (#5487)

This commit is contained in:
Audrius Butkevicius
2019-02-12 06:58:24 +00:00
committed by Jakob Borg
parent 7bac927ac8
commit dc929946fe
37 changed files with 944 additions and 1723 deletions

View File

@@ -72,8 +72,10 @@ func (s Size) String() string {
return fmt.Sprintf("%v %s", s.Value, s.Unit)
}
func (Size) ParseDefault(s string) (interface{}, error) {
return ParseSize(s)
func (s *Size) ParseDefault(str string) error {
sz, err := ParseSize(str)
*s = sz
return err
}
func checkFreeSpace(req Size, usage fs.Usage) error {