A dictionary you cannot fill is useless. Today you add words to it and make membership ignore case, so "Apple", "apple", and "APPLE" are all the same known word.
Store added words and make Contains match regardless of the case of either the stored word or the query.
Spelling is not about capitalization - Apple at the start of a sentence and
apple mid-sentence are the same word, and a checker that flagged one because it
learned the other would be useless. The fix is normalization: fold every word
to a single canonical form (lower case) both when you store it and when you look
it up. Do it in one small helper so the two paths can never drift apart.
A set is the natural home for the words - you only care whether a word is
present, not how many times or in what order (that changes later, when frequency
starts to matter). Storing the normalized form means the set holds apple, and
any casing of the query normalizes to the same key and hits.
// fold case ONCE, on the way in and on the way out, so the// stored form and the query form always agreefunc normalize(word string) string { /* lower-case it */ }func (d *Dictionary) Add(word string) {// store normalize(word) in a set}func (d *Dictionary) Contains(word string) bool {// look up normalize(word)}