mirror of
https://github.com/btouchard/ackify-ce.git
synced 2026-02-11 16:29:13 -06:00
fix: format lang.go
This commit is contained in:
@@ -38,14 +38,6 @@ func GetLang(ctx context.Context) string {
|
||||
return DefaultLang
|
||||
}
|
||||
|
||||
// GetI18n extracts i18n service from context
|
||||
func GetI18n(ctx context.Context) *I18n {
|
||||
if i18n, ok := ctx.Value(i18nContextKey).(*I18n); ok {
|
||||
return i18n
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// GetTranslations extracts translations map from context
|
||||
func GetTranslations(ctx context.Context) map[string]string {
|
||||
if trans, ok := ctx.Value(transContextKey).(map[string]string); ok {
|
||||
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/btouchard/ackify-ce/internal/infrastructure/i18n"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/btouchard/ackify-ce/pkg/logger"
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
type LangHandlers struct {
|
||||
|
||||
Reference in New Issue
Block a user