mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-08-14 06:06:12 +00:00
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:
parent
860f30882a
commit
7e6f2b8d64
@ -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
|
||||
}
|
||||
|
||||
|
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user