The usage of '-ing' and '-in' in writing

Writing is ordinarily phonemic, not necessarily phonetic. Before a phonemic consonant cluster, tense /i:/ is ordinarily laxed to /i/, so you don't get */goi:ng/, but rather /going/. However, phonetically, after loss of the final /g/, [goi:n] is perfectly possible. In fact, this is my usual pronunciation of the -/ing/ ending.

-/in/ is a dialectal variant (which you could hear in some British dialects, like that of Lord Peter Wimsey).