@@ -13,7 +13,7 @@ import (
13
13
14
14
const (
15
15
guestCommunicationsPrefix = `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\GuestCommunicationServices`
16
- MagicVSOCKSuffix = "-facb-11e6-bd58-64006a7986d3"
16
+ magicVSOCKSuffix = "-facb-11e6-bd58-64006a7986d3"
17
17
wslDistroInfoPrefix = `SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss`
18
18
)
19
19
@@ -34,7 +34,7 @@ func AddVSockRegistryKey(port int) error {
34
34
return fmt .Errorf ("port %q in use" , port )
35
35
}
36
36
37
- vsockKeyPath := fmt .Sprintf (`%x%s` , port , MagicVSOCKSuffix )
37
+ vsockKeyPath := fmt .Sprintf (`%x%s` , port , magicVSOCKSuffix )
38
38
vSockKey , _ , err := registry .CreateKey (
39
39
rootKey ,
40
40
vsockKeyPath ,
@@ -61,7 +61,7 @@ func RemoveVSockRegistryKey(port int) error {
61
61
}
62
62
defer rootKey .Close ()
63
63
64
- vsockKeyPath := fmt .Sprintf (`%x%s` , port , MagicVSOCKSuffix )
64
+ vsockKeyPath := fmt .Sprintf (`%x%s` , port , magicVSOCKSuffix )
65
65
if err := registry .DeleteKey (rootKey , vsockKeyPath ); err != nil {
66
66
return fmt .Errorf (
67
67
"failed to create new key (%s%s): %w" ,
@@ -215,7 +215,7 @@ func getUsedPorts(key registry.Key) ([]int, error) {
215
215
216
216
out := []int {}
217
217
for _ , k := range keys {
218
- split := strings .Split (k , MagicVSOCKSuffix )
218
+ split := strings .Split (k , magicVSOCKSuffix )
219
219
if len (split ) == 2 {
220
220
i , err := strconv .Atoi (split [0 ])
221
221
if err != nil {
0 commit comments