package main import "strings" type MessageFilter = func(rawText string) bool func MessageIsAboutCoffee(rawText string) bool { textLower := strings.ToLower(rawText) thisIsAboutCoffee := strings.Contains(textLower, "coffee") || strings.Contains(textLower, "コーヒー") return thisIsAboutCoffee } func MessageSlippedOnBananaPeel(rawText string) bool { textLower := strings.ToLower(rawText) thisIsAboutCoffee := (strings.Contains(textLower, "banana") || strings.Contains(textLower, "peel")) return thisIsAboutCoffee }