feat: the demo's Azure accounts are alex and admin.alex, named like accounts #25
No files matched your search
@@ -243,8 +243,8 @@ Flags:
|
|||||||
if *demo {
|
if *demo {
|
||||||
// Two Azure accounts, like a personal and an admin login in az.
|
// Two Azure accounts, like a personal and an admin login in az.
|
||||||
providers = []provider.Provider{
|
providers = []provider.Provider{
|
||||||
fake.Azure(400*time.Millisecond).As("Azure:dev@example.com/demo", "Azure · dev"),
|
fake.Azure(400*time.Millisecond).As("Azure:alex@example.com/demo", "Azure · alex"),
|
||||||
fake.AzureOps(700*time.Millisecond).As("Azure:ops@example.com/demo", "Azure · ops"),
|
fake.AzureOps(700*time.Millisecond).As("Azure:admin.alex@example.com/demo", "Azure · admin.alex"),
|
||||||
fake.Databricks(600 * time.Millisecond),
|
fake.Databricks(600 * time.Millisecond),
|
||||||
fake.Repos(),
|
fake.Repos(),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -147,8 +147,8 @@ func sourceMatches(r ref.Ref, src provider.Source) bool {
|
|||||||
return src.ID == r.Subscription
|
return src.ID == r.Subscription
|
||||||
}
|
}
|
||||||
|
|
||||||
// accountOf is the account part of a source's provider label ("dev" in
|
// accountOf is the account part of a source's provider label ("alex" in
|
||||||
// "Azure · dev"), or "" when there's a single account.
|
// "Azure · alex"), or "" when there's a single account.
|
||||||
func accountOf(src provider.Source) string {
|
func accountOf(src provider.Source) string {
|
||||||
account, ok := strings.CutPrefix(src.ProviderLabel, string(src.Kind)+" · ")
|
account, ok := strings.CutPrefix(src.ProviderLabel, string(src.Kind)+" · ")
|
||||||
if !ok {
|
if !ok {
|
||||||
|
|||||||
Reference in new issue
Block a user