| LCOV - code coverage report | ||||||||||||||||||||||
|
||||||||||||||||||||||
Line data Source code 1 : // Package i18n は i18n(多言語化)関連のユースケースを提供します。 2 : package i18n 3 : 4 : import "context" 5 : 6 : // GetMessage は単一キーの翻訳を取得します。 7 : // Translator 経由でキャッシュを参照し、該当キーが存在する場合は文字列を返します。 8 0 : func (uc *Interactor) GetMessage(ctx context.Context, in GetMessageInput) (GetMessageOutput, error) { 9 0 : txt, ok := uc.tr.Translate(in.Locale, in.Key) 10 0 : return GetMessageOutput{Text: txt, OK: ok}, nil 11 0 : } |
| Generated by: LCOV version 2.3.1-1 |