3
0

chore: slice append replace loop (#1358)

This commit is contained in:
guangwu
2023-11-29 18:55:38 +08:00
committed by Peter Grlica
parent 186cecad7b
commit db42a86bd1
2 changed files with 2 additions and 6 deletions

View File

@@ -156,9 +156,7 @@ func newConfig(provider *Provider, authURL, tokenURL string, scopes []string) *o
Scopes: []string{},
}
for _, scope := range scopes {
c.Scopes = append(c.Scopes, scope)
}
c.Scopes = append(c.Scopes, scopes...)
return c
}

View File

@@ -98,9 +98,7 @@ func (ri Identifiers) Add(ii ...string) Identifiers {
func (ri Identifiers) Clone() Identifiers {
out := make(Identifiers, 0, len(ri))
for _, i := range ri {
out = append(out, i)
}
out = append(out, ri...)
return out
}