(s string)
| 19 | } |
| 20 | |
| 21 | func (b *Bytes) Set(s string) error { |
| 22 | b.defStr = "" |
| 23 | b.Bytes = 0 |
| 24 | bytes, err := units.ParseStrictBytes(s) |
| 25 | if err != nil { |
| 26 | return err |
| 27 | } |
| 28 | b.Bytes = units.Base2Bytes(bytes) |
| 29 | return nil |
| 30 | } |
| 31 | |
| 32 | func NewBytes(def uint64) Bytes { |
| 33 | bytes := units.Base2Bytes(def) |
no outgoing calls
no test coverage detected