From eff2cbde8b864ddbd7c69231ecfb200118ee11ed Mon Sep 17 00:00:00 2001 From: Carlosokumu Date: Tue, 24 Sep 2024 09:00:31 +0300 Subject: [PATCH] setup check for unused code --- internal/utils/isocode.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 internal/utils/isocode.go diff --git a/internal/utils/isocode.go b/internal/utils/isocode.go new file mode 100644 index 0000000..34365b0 --- /dev/null +++ b/internal/utils/isocode.go @@ -0,0 +1,15 @@ +package utils + + + + +var isoCodes = map[string]bool{ + "eng": true, // English + "swa": true, // Swahili + +} + +func IsValidISO639(code string) bool { + return isoCodes[code] +} +