mirror of
https://github.com/steveiliop56/tinyauth.git
synced 2025-10-28 04:35:40 +00:00
chore: fix typo
This commit is contained in:
@@ -18,10 +18,10 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
|
|||||||
|
|
||||||
finalKey = append(finalKey, rootName)
|
finalKey = append(finalKey, rootName)
|
||||||
finalKey = append(finalKey, "providers")
|
finalKey = append(finalKey, "providers")
|
||||||
cebabKey := strings.ToLower(k)
|
kebabKey := strings.ToLower(k)
|
||||||
|
|
||||||
for _, known := range knownKeys {
|
for _, known := range knownKeys {
|
||||||
if strings.HasSuffix(cebabKey, strings.ReplaceAll(known, "-", sep)) {
|
if strings.HasSuffix(kebabKey, strings.ReplaceAll(known, "-", sep)) {
|
||||||
suffix = known
|
suffix = known
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -31,7 +31,7 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
clientNameParts := strings.Split(strings.TrimPrefix(strings.TrimSuffix(cebabKey, sep+strings.ReplaceAll(suffix, "-", sep)), "providers"+sep), sep)
|
clientNameParts := strings.Split(strings.TrimPrefix(strings.TrimSuffix(kebabKey, sep+strings.ReplaceAll(suffix, "-", sep)), "providers"+sep), sep)
|
||||||
|
|
||||||
for i, p := range clientNameParts {
|
for i, p := range clientNameParts {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
@@ -46,9 +46,9 @@ func NormalizeKeys(keys map[string]string, rootName string, sep string) map[stri
|
|||||||
|
|
||||||
finalKey = append(finalKey, camelClientName)
|
finalKey = append(finalKey, camelClientName)
|
||||||
|
|
||||||
filedParts := strings.Split(suffix, "-")
|
fieldParts := strings.Split(suffix, "-")
|
||||||
|
|
||||||
for i, p := range filedParts {
|
for i, p := range fieldParts {
|
||||||
if i == 0 {
|
if i == 0 {
|
||||||
camelField += p
|
camelField += p
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user