aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/l18n/l18n.go
diff options
context:
space:
mode:
Diffstat (limited to 'l18n/l18n.go')
-rw-r--r--l18n/l18n.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/l18n/l18n.go b/l18n/l18n.go
index 76c52ccf..512fe2a2 100644
--- a/l18n/l18n.go
+++ b/l18n/l18n.go
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: MIT
*
- * Copyright (C) 2019 WireGuard LLC. All Rights Reserved.
+ * Copyright (C) 2019-2022 WireGuard LLC. All Rights Reserved.
*/
package l18n
@@ -13,8 +13,10 @@ import (
"golang.org/x/text/message"
)
-var printer *message.Printer
-var printerLock sync.Mutex
+var (
+ printer *message.Printer
+ printerLock sync.Mutex
+)
// prn returns the printer for user preferred UI language.
func prn() *message.Printer {
@@ -50,7 +52,7 @@ func lang() (tag language.Tag) {
}
// Sprintf is like fmt.Sprintf, but using language-specific formatting.
-func Sprintf(key message.Reference, a ...interface{}) string {
+func Sprintf(key message.Reference, a ...any) string {
return prn().Sprintf(key, a...)
}