f

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultPlural

func DefaultPlural(msgID, msgIDPlural string, n int64, args ...interface{}) string

DefaultPlural if n == 1 return singular form, else return plural form

func Format

func Format(format string, args ...interface{}) string

Format format a string with args, like fmt.Sprintf, but if args tow many, not prints %!(EXTRA type=value); and if no args, will return original string, even it contains some verb(like %v/%d), it would not prints MISSING error. 格式化字符串,功能同 fmt.Sprintf, 但是当参数多于占位符时, 不会输出额外的 %!(EXTRA type=value); 当 args 为空时直接返回原字符串(若包含格式化动词也原样返回而不会打印 MISSING 错误)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL