From 387abb915b819ab071b8fa87cf81b4b344c453a9 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 12 Jan 2020 12:20:10 +0100 Subject: [PATCH] Backend: Add TitlesAndRanks to txt package Signed-off-by: Michael Mayer --- internal/txt/maps.go | 96 +++++++++++++++++++++++++++++++++++++++ internal/txt/maps_test.go | 16 +++++++ 2 files changed, 112 insertions(+) create mode 100644 internal/txt/maps.go create mode 100644 internal/txt/maps_test.go diff --git a/internal/txt/maps.go b/internal/txt/maps.go new file mode 100644 index 000000000..a3b36a97a --- /dev/null +++ b/internal/txt/maps.go @@ -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, +} diff --git a/internal/txt/maps_test.go b/internal/txt/maps_test.go new file mode 100644 index 000000000..add3619d4 --- /dev/null +++ b/internal/txt/maps_test.go @@ -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"]) + }) +}