vc-utils: don't export unused function

Many of these functions are just used on one place throughout the rest
of the code base. If we create hypervisor package, newtork package, etc, we may want to
parse this out.

Fixes: #3049

Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
Eric Ernst 2021-11-04 13:24:08 -07:00
parent 860f30882a
commit 7e6f2b8d64
2 changed files with 4 additions and 4 deletions

View File

@ -71,8 +71,8 @@ func GenerateRandomBytes(n int) ([]byte, error) {
return b, nil
}
// ReverseString reverses whole string
func ReverseString(s string) string {
// reverseString reverses whole string
func reverseString(s string) string {
r := []rune(s)
length := len(r)
@ -160,7 +160,7 @@ func GetVirtDriveName(index int) (string, error) {
return "", fmt.Errorf("Index not supported")
}
diskName := prefix + ReverseString(string(diskLetters[:i]))
diskName := prefix + reverseString(string(diskLetters[:i]))
return diskName, nil
}

View File

@ -97,7 +97,7 @@ func TestGenerateRandomBytes(t *testing.T) {
func TestRevereString(t *testing.T) {
assert := assert.New(t)
str := "Teststr"
reversed := ReverseString(str)
reversed := reverseString(str)
assert.Equal(reversed, "rtstseT")
}