Skip to content

Commit

Permalink
optimize implementation
Browse files Browse the repository at this point in the history
Signed-off-by: spacewander <[email protected]>
  • Loading branch information
spacewander committed Nov 27, 2024
1 parent 4e9f098 commit f9ade48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/plugins/tests/integration/controlplane/control_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ func NewControlPlane() *ControlPlane {
}

func getRandomString(n int) string {
var Letters = []rune("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
result := make([]rune, n)
const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
result := make([]byte, n)
for i := range result {
result[i] = Letters[rand.Intn(len(Letters))]
result[i] = letters[rand.Intn(len(letters))]
}
return string(result)
}
Expand Down

0 comments on commit f9ade48

Please sign in to comment.