Browse Source

refactor(locale): use any instead of interface{}

jvoisin 9 months ago
parent
commit
8e86004936
2 changed files with 2 additions and 2 deletions
  1. 1 1
      internal/locale/catalog.go
  2. 1 1
      internal/locale/printer.go

+ 1 - 1
internal/locale/catalog.go

@@ -9,7 +9,7 @@ import (
 	"fmt"
 )
 
-type translationDict map[string]interface{}
+type translationDict map[string]any
 type catalog map[string]translationDict
 
 var defaultCatalog = make(catalog, len(AvailableLanguages))

+ 1 - 1
internal/locale/printer.go

@@ -22,7 +22,7 @@ func (p *Printer) Print(key string) string {
 }
 
 // Printf is like fmt.Printf, but using language-specific formatting.
-func (p *Printer) Printf(key string, args ...interface{}) string {
+func (p *Printer) Printf(key string, args ...any) string {
 	translation := key
 
 	if dict, err := GetTranslationDict(p.language); err == nil {