如何在golang.org/x/text/currency中添加新的货币支持

The package golang.org/x/text/currency is designed to handle currency standard printing implementation.

It provides all the most common currencies via a bunch of const currency.Unit

A currency.Unit is a struct to an uint index

They refers to some data located under internal folder.

I want to add support for a new currency. How do I proceed ?

Considering the Currency Unit represents ISO_4217, and seems fairly complete, you can't extend it directly.

You would need to go: