mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
15 lines
281 B
Go
15 lines
281 B
Go
|
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)
|
||
|
}
|