MCPcopy Index your code
hub / github.com/coder/coder / UniqueName

Function UniqueName

coderd/util/namesgenerator/namesgenerator.go:51–53  ·  view source on GitHub ↗

UniqueName returns a random name with a monotonically increasing suffix, guaranteeing uniqueness within the process. The name is truncated to 32 characters if necessary, preserving the numeric suffix.

()

Source from the content-addressed store, hash-verified

49// guaranteeing uniqueness within the process. The name is truncated to 32
50// characters if necessary, preserving the numeric suffix.
51func UniqueName() string {
52 return UniqueNameWith("_")
53}
54
55// UniqueNameWith returns a unique name with a custom delimiter.
56// See UniqueName for details on uniqueness guarantees.

Callers 9

RandomRBACObjectFunction · 0.92
RandomRBACSubjectFunction · 0.92
createAnotherUserRetryFunction · 0.92
GetRandomNameFunction · 0.92
TestManagedAgentLimitFunction · 0.92
writeReadEchoFunction · 0.92
CreateOrganizationFunction · 0.92
NewWorkspaceProxyReplicaFunction · 0.92
TestUniqueNameLengthFunction · 0.85

Calls 1

UniqueNameWithFunction · 0.85

Tested by 3

TestManagedAgentLimitFunction · 0.74
writeReadEchoFunction · 0.74
TestUniqueNameLengthFunction · 0.68