package main // A licence's key taken by another (design 39 bus-and-switch ยง10, B6); the key form itself is the shared package's. import ( "context" . "claude-licence-manager/internal/licences" ) // keyTaken names the licence other than name whose key is name's, or "" when none is. func (m *Manager) keyTaken(ctx context.Context, name string) (string, error) { all, err := m.Store.Licences(ctx) if err != nil { return "", err } key := KeyFor(name) for _, l := range all { if l.Name != name && KeyFor(l.Name) == key { return l.Name, nil } } return "", nil }