seaweedfs/weed-fs/src/pkg/storage/volume_id.go

15 lines
281 B
Go
Raw Normal View History

2012-08-24 06:24:32 +00:00
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)
}