MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / AddUser

Method AddUser

e2e_framework_test.go:516–526  ·  view source on GitHub ↗
(username string)

Source from the content-addressed store, hash-verified

514}
515
516func (a *authUserStorage) AddUser(username string) AuthUser {
517 a.lock.Lock()
518 defer a.lock.Unlock()
519 if _, ok := a.users[username]; ok {
520 panic(message.NewMessage(message.MTest, "User %s already exists in test user database.", username))
521 }
522 a.users[username] = &authUser{
523 lock: &sync.Mutex{},
524 }
525 return a.users[username]
526}
527
528func (a *authUserStorage) GetUser(username string) (AuthUser, error) {
529 a.lock.Lock()

Callers

nothing calls this directly

Calls 1

NewMessageFunction · 0.92

Tested by

no test coverage detected