You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
281 B
14 lines
281 B
package storage
|
|
|
|
import (
|
|
"strconv"
|
|
)
|
|
|
|
type VolumeId uint32
|
|
func NewVolumeId(vid string) (VolumeId,error) {
|
|
volumeId, err := strconv.ParseUint(vid, 10, 64)
|
|
return VolumeId(volumeId), err
|
|
}
|
|
func (vid *VolumeId) String() string{
|
|
return strconv.FormatUint(uint64(*vid), 10)
|
|
}
|