Backend: Add TitlesAndRanks to txt package

Signed-off-by: Michael Mayer <michael@liquidbytes.net>
This commit is contained in:
Michael Mayer 2020-01-12 12:20:10 +01:00
parent f7e865a979
commit 387abb915b
2 changed files with 112 additions and 0 deletions

96
internal/txt/maps.go Normal file
View file

@ -0,0 +1,96 @@
package txt
var TitlesAndRanks = map[string]bool {
"emperor": true,
"caliph": true,
"king": true,
"kings": true,
"shahanshah": true,
"padishah": true,
"sultan": true,
"chakravarti": true,
"chhatrapati": true,
"samrat": true,
"khagan": true,
"high": true,
"great": true,
"maharaja": true,
"beg": true,
"khan": true,
"amir": true,
"al-umara": true,
"bek": true,
"malik": true,
"emir": true,
"hakim": true,
"sharif": true,
"shah": true,
"shirvanshah": true,
"raja": true,
"dey": true,
"duke": true,
"khedive": true,
"nawab": true,
"wāli": true,
"nizam": true,
"crown": true,
"prince": true,
"shahzada": true,
"mirza": true,
"awabzada": true,
"yuvraj": true,
"vali": true,
"mir": true,
"ikhshid": true,
"pasha": true,
"thakur": true,
"babu": true,
"saheb": true,
"sardar": true,
"rajkumar": true,
"sahibzada": true,
"nawabzada": true,
"earl": true,
"mankari": true,
"dewan": true,
"rao": true,
"bahadur": true,
"rai": true,
"beylerbey": true,
"atabeg": true,
"viscount": true,
"zamindar": true,
"sahib": true,
"bey": true,
"begum": true,
"begzada": true,
"baron": true,
"lala": true,
"agha": true,
"hazinedar": true,
"queen": true,
"pope": true,
"marquess": true,
"baroness": true,
"princess": true,
"lord": true,
"lady": true,
"supreme": true,
"leader": true,
"chief": true,
"excellency": true,
"doctor": true,
"president": true,
"marshal": true,
"conqueror": true,
"general": true,
"admiral": true,
"guide": true,
"executive": true,
"bishop": true,
"highness": true,
"his": true,
"her": true,
"monsignor": true,
"sire": true,
}

16
internal/txt/maps_test.go Normal file
View file

@ -0,0 +1,16 @@
package txt
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTitlesAndRanks(t *testing.T) {
t.Run("king", func(t *testing.T) {
assert.True(t, TitlesAndRanks["king"])
})
t.Run("fool", func(t *testing.T) {
assert.False(t, TitlesAndRanks["fool"])
})
}