add function ParseFileIdFromString

This commit is contained in:
stlpmo-jn
2019-04-20 18:39:06 +08:00
parent 3b3651dea3
commit 2200ea9cb9
4 changed files with 150 additions and 4 deletions

View File

@@ -10,9 +10,9 @@ 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)
func (vid VolumeId) String() string {
return strconv.FormatUint(uint64(vid), 10)
}
func (vid *VolumeId) Next() VolumeId {
return VolumeId(uint32(*vid) + 1)
func (vid VolumeId) Next() VolumeId {
return VolumeId(uint32(vid) + 1)
}