[#185] ir: Resolve funlen linter

Resolve funlen linter for GlagoliticLetter.String method

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
Dmitrii Stepanov 2023-03-29 11:41:30 +03:00 committed by Gitea
parent 7be5a0fd79
commit 85fb9e77c4

View file

@ -52,96 +52,56 @@ const (
lastLetterNum lastLetterNum
) )
// String returns l in config-compatible format. var glagolicLetterToString = map[GlagoliticLetter]string{
// az: "az",
// nolint: funlen buky: "buky",
func (l GlagoliticLetter) String() string { vedi: "vedi",
switch l { glagoli: "glagoli",
default: dobro: "dobro",
return "unknown" yest: "yest",
case az: zhivete: "zhivete",
return "az" dzelo: "dzelo",
case buky: zemlja: "zemlja",
return "buky" izhe: "izhe",
case vedi: izhei: "izhei",
return "vedi" gerv: "gerv",
case glagoli: kako: "kako",
return "glagoli" ljudi: "ljudi",
case dobro: mislete: "mislete",
return "dobro" nash: "nash",
case yest: on: "on",
return "yest" pokoj: "pokoj",
case zhivete: rtsi: "rtsi",
return "zhivete" slovo: "slovo",
case dzelo: tverdo: "tverdo",
return "dzelo" uk: "uk",
case zemlja: fert: "fert",
return "zemlja" kher: "kher",
case izhe: oht: "oht",
return "izhe" shta: "shta",
case izhei: tsi: "tsi",
return "izhei" cherv: "cherv",
case gerv: sha: "sha",
return "gerv" yer: "yer",
case kako: yeri: "yeri",
return "kako" yerj: "yerj",
case ljudi: yat: "yat",
return "ljudi" jo: "jo",
case mislete: yu: "yu",
return "mislete" smallYus: "small.yus",
case nash: smallIotatedYus: "small.iotated.yus",
return "nash" bigYus: "big.yus",
case on: bigIotatedYus: "big.iotated.yus",
return "on" fita: "fita",
case pokoj: izhitsa: "izhitsa",
return "pokoj"
case rtsi:
return "rtsi"
case slovo:
return "slovo"
case tverdo:
return "tverdo"
case uk:
return "uk"
case fert:
return "fert"
case kher:
return "kher"
case oht:
return "oht"
case shta:
return "shta"
case tsi:
return "tsi"
case cherv:
return "cherv"
case sha:
return "sha"
case yer:
return "yer"
case yeri:
return "yeri"
case yerj:
return "yerj"
case yat:
return "yat"
case jo:
return "jo"
case yu:
return "yu"
case smallYus:
return "small.yus"
case smallIotatedYus:
return "small.iotated.yus"
case bigYus:
return "big.yus"
case bigIotatedYus:
return "big.iotated.yus"
case fita:
return "fita"
case izhitsa:
return "izhitsa"
} }
// String returns l in config-compatible format.
func (l GlagoliticLetter) String() string {
if str, found := glagolicLetterToString[l]; found {
return str
}
return "unknown"
} }
type alphabetContracts map[GlagoliticLetter]util.Uint160 type alphabetContracts map[GlagoliticLetter]util.Uint160