avoid the "src" folder

This commit is contained in:
Chris Lu
2013-02-10 03:25:35 -08:00
parent 1b6f53cdac
commit ab6fb13ad7
51 changed files with 0 additions and 0 deletions

18
weed/storage/volume_id.go Normal file
View File

@@ -0,0 +1,18 @@
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)
}
func (vid *VolumeId) Next() VolumeId {
return VolumeId(uint32(*vid) + 1)
}