Documentation ¶
Overview ¶
Package driveletter implements utilities for working with unix drive letters. For a device file like /dev/sda, this would be the "a". Specifically, this helps deal with the fact that drive letters can actually be longer than one character. This is because once the letter "z" is used, the next letter will be "aa", so it works similarly to a numeric counting system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DriveLetter ¶
type DriveLetter struct {
// contains filtered or unexported fields
}
DriveLetter represents a unix drive letter. This is typically the last character in a device file like /dev/sda (though it can also be multiple characters).
func (*DriveLetter) Inc ¶
func (d *DriveLetter) Inc()
Inc increments the internal counter by one. Looking at the string representation, this would turn "a" into "b", "z" into "aa", and "az" into "ba", for example.
func (*DriveLetter) String ¶
func (d *DriveLetter) String() string
String returns a string representation of the DriveLetter. This is basically similar to a transformation to base 26, using the letters of the alphabet as digits.