KSJ67GFXOUX64TIEWVG3PPOLWXGPAK7IXDPNORDDUCIY3OZQWZOAC
NHIL4CT5XMIJLZOLDHK3WE43ZVQLCA2TGCXE7GWBKBL5TUVPCMKQC
}type langSpec struct { date string // Date desc string // Description change string // Change thsep string // Thousand separator decsep string // Decimal separator
}
type langSpec struct {
date string // Date
desc string // Description
change string // Change
thsep string // Thousand separator
decsep string // Decimal separator
var lang = map[string][]string{ "en-US": {"Date", "Description", "Change", ",", // thousand separator "."}, // decimal separator
var lang = map[string][]string{
"en-US": {"Date", "Description", "Change",
",", // thousand separator
"."}, // decimal separator
var lang = map[string]langSpec{ "en-US": {"Date", "Description", "Change", ",", "."},
var lang = map[string]langSpec{
"en-US": {"Date", "Description", "Change", ",", "."},
// - use strings.Builder{} for creating output
// - use strings.Builder for creating output
s := strings.Builder{} s.WriteString(fmt.Sprintf("%-10s | %-25s | %s\n", st[0], st[1], st[2]))
s := strings.Builder{}
s.WriteString(fmt.Sprintf("%-10s | %-25s | %s\n", st[0], st[1], st[2]))
var s strings.Builder s.WriteString(fmt.Sprintf("%-10s | %-25s | %s\n", st.date, st.desc, st.change))
var s strings.Builder
s.WriteString(fmt.Sprintf("%-10s | %-25s | %s\n", st.date, st.desc, st.change))
return "", errors.New("date parsing failed: %w")
return "", fmt.Errorf("date parsing failed: %w", err)
return "", errors.New("conversion error: %w")
return "", fmt.Errorf("conversion error: %w", err)
a := thoucents(amount, lang[locale][3], lang[locale][4])
a := thoucents(amount, lang[locale].thsep, lang[locale].decsep)
ret := strings.Builder{}
var ret strings.Builder