package main /* AllSizes returns a properly parsed and consolidated slice of all specified sizes, as it takes two valid syntaxes (`-s 32 -s 32`, `-s 32,32`) that can be mixed together. */ func (v *VLSMArgs) AllSizes() (sizes []uint8, err error) { var sizeSlice []uint8 if v == nil { return } if v.Sizes == nil || len(v.Sizes) == 0 { return } for _, s := range v.Sizes { if sizeSlice, err = s.Sizes(); err != nil { return } sizes = append(sizes, sizeSlice...) } return }