Home > Backend Development > Golang > I Make Golang library

I Make Golang library

Susan Sarandon
Release: 2024-11-26 13:20:11
Original
600 people have browsed it

I Make Golang library

To format or convert back currency with currencyCode and locale, you can use the FormatCurrency and ParseCurrency functions with the appropriate parameters as shown in the table above.

Installation

To use the latest stable version:
go get github.com/nandasafiqalfiansyah/gocurrency@v1.1.0

Example
formattedUsd, err := gocurrency.FormatCurrency(123456789, "USD", "en_US")
decodedUsd, err := gocurrency.ParseCurrency(formattedUsd, "USD")

The above is the detailed content of I Make Golang library. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template