github.com/gocaveman/caveman@v0.0.0-20191211162744-0ddf99dbdf6e/i18n/handler-locale-retry.go (about) 1 package i18n 2 3 func NewLocaleRetryHandler(h interface{}, debug bool) *LocaleRetryHandler { 4 return &LocaleRetryHandler{Handler: h, Debug: debug} 5 } 6 7 type LocaleRetryHandler struct { 8 Handler interface{} 9 Debug bool 10 } 11 12 // TODO: needs to extract the current locales for the request and try one after the other on 13 // h, ignoring 404s until one succeeds or the locales are exhausted.