MCPcopy Create free account
hub / github.com/coder/envbuilder / findUser

Function findUser

envbuilder.go:1403–1415  ·  view source on GitHub ↗

findUser looks up a user by name or ID.

(nameOrID string)

Source from the content-addressed store, hash-verified

1401
1402// findUser looks up a user by name or ID.
1403func findUser(nameOrID string) (*user.User, error) {
1404 if nameOrID == "" {
1405 return &user.User{
1406 Uid: "0",
1407 Gid: "0",
1408 }, nil
1409 }
1410 _, err := strconv.Atoi(nameOrID)
1411 if err == nil {
1412 return user.LookupId(nameOrID)
1413 }
1414 return user.Lookup(nameOrID)
1415}
1416
1417func execOneLifecycleScript(
1418 ctx context.Context,

Callers 1

getUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected