Skip to content

Commit f68b6e9

Browse files
committed
use set from utils package in v18
1 parent 5f3125d commit f68b6e9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/service/connect.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import (
6464
"github.com/gravitational/teleport/lib/utils"
6565
"github.com/gravitational/teleport/lib/utils/interval"
6666
logutils "github.com/gravitational/teleport/lib/utils/log"
67-
"github.com/gravitational/teleport/lib/utils/set"
6867
)
6968

7069
const updateClientsJoinWarning = "This agent joined the cluster during the update_clients phase of a host CA rotation, so its services might not be usable by clients that haven't logged in recently."
@@ -324,8 +323,8 @@ func (process *TeleportProcess) connect(role types.SystemRole, opts ...certOptio
324323
}
325324

326325
func (process *TeleportProcess) healInstanceIdentity(currentIdentity *state.Identity) (*state.Identity, error) {
327-
currentSystemRoles := set.New(currentIdentity.SystemRoles...)
328-
wantSystemRoles := set.NewWithCapacity[string](len(process.instanceRoles))
326+
currentSystemRoles := utils.NewSet(currentIdentity.SystemRoles...)
327+
wantSystemRoles := utils.NewSetWithCapacity[string](len(process.instanceRoles))
329328
for role := range process.instanceRoles {
330329
wantSystemRoles.Add(string(role))
331330
}
@@ -385,7 +384,7 @@ func (process *TeleportProcess) healInstanceIdentity(currentIdentity *state.Iden
385384
}
386385
}
387386

388-
newSystemRoles := set.New(newIdentity.SystemRoles...)
387+
newSystemRoles := utils.NewSet(newIdentity.SystemRoles...)
389388

390389
// Sanity check we didn't lose any system roles.
391390
if lostRoles := currentSystemRoles.Clone().Subtract(newSystemRoles); len(lostRoles) > 0 {

0 commit comments

Comments
 (0)