Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/text/currency: add support for integer #32769

Closed
YunxiangHuang opened this issue Jun 25, 2019 · 4 comments
Closed

x/text/currency: add support for integer #32769

YunxiangHuang opened this issue Jun 25, 2019 · 4 comments
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@YunxiangHuang
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.12.6 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/yunxiang.huang/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/yunxiang.huang/Work/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.6/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/nz/kfm5t8n50dq8gz79ln3jfchc0000gn/T/go-build553255337=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

package main

import (
	"fmt"

	"golang.org/x/text/currency"
)

func main() {
	cur := currency.MustParseISO("CNY")
	fmt.Println(currency.NarrowSymbol(cur.Amount(0)))
	fmt.Println(currency.Symbol(cur.Amount(0)))
}

What did you expect to see?

¥0.00
CN¥ 0.00

What did you see instead?

¥ %!f(int=00)
CN¥ %!f(int=00)
@gopherbot gopherbot added this to the Unreleased milestone Jun 25, 2019
@andybons andybons added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 25, 2019
@andybons
Copy link
Member

@mpvl

@rhnvrm
Copy link
Contributor

rhnvrm commented Jun 28, 2019

@andybons @mpvl @YunxiangHuang - I'd be happy to work on this issue

@ALTree ALTree changed the title x/text/currency: add support for integer. x/text/currency: add support for integer Jul 20, 2020
AlexanderYastrebov added a commit to AlexanderYastrebov/text that referenced this issue Oct 18, 2021
@AlexanderYastrebov
Copy link
Contributor

Should be fixed by golang/text#27

@elliotwutingfeng
Copy link

This appears to be fixed as of Go 1.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

7 participants