@@ -13,7 +13,7 @@ import (
1313
1414const (
1515 guestCommunicationsPrefix = `SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\GuestCommunicationServices`
16- MagicVSOCKSuffix = "-facb-11e6-bd58-64006a7986d3"
16+ magicVSOCKSuffix = "-facb-11e6-bd58-64006a7986d3"
1717 wslDistroInfoPrefix = `SOFTWARE\Microsoft\Windows\CurrentVersion\Lxss`
1818)
1919
@@ -34,7 +34,7 @@ func AddVSockRegistryKey(port int) error {
3434 return fmt .Errorf ("port %q in use" , port )
3535 }
3636
37- vsockKeyPath := fmt .Sprintf (`%x%s` , port , MagicVSOCKSuffix )
37+ vsockKeyPath := fmt .Sprintf (`%x%s` , port , magicVSOCKSuffix )
3838 vSockKey , _ , err := registry .CreateKey (
3939 rootKey ,
4040 vsockKeyPath ,
@@ -61,7 +61,7 @@ func RemoveVSockRegistryKey(port int) error {
6161 }
6262 defer rootKey .Close ()
6363
64- vsockKeyPath := fmt .Sprintf (`%x%s` , port , MagicVSOCKSuffix )
64+ vsockKeyPath := fmt .Sprintf (`%x%s` , port , magicVSOCKSuffix )
6565 if err := registry .DeleteKey (rootKey , vsockKeyPath ); err != nil {
6666 return fmt .Errorf (
6767 "failed to create new key (%s%s): %w" ,
@@ -215,7 +215,7 @@ func getUsedPorts(key registry.Key) ([]int, error) {
215215
216216 out := []int {}
217217 for _ , k := range keys {
218- split := strings .Split (k , MagicVSOCKSuffix )
218+ split := strings .Split (k , magicVSOCKSuffix )
219219 if len (split ) == 2 {
220220 i , err := strconv .Atoi (split [0 ])
221221 if err != nil {
0 commit comments