mattevans / dinero Goto Github PK
View Code? Open in Web Editor NEW๐ ๐ฐ A golang interface for the Open Exchange Rates API
Home Page: https://docs.openexchangerates.org/docs/
License: MIT License
๐ ๐ฐ A golang interface for the Open Exchange Rates API
Home Page: https://docs.openexchangerates.org/docs/
License: MIT License
Added some code to my project dedicated to this library:
package main
import (
exchangeRates "github.com/mattevans/dinero"
)
// ExchangeRatesClient - pointer to exchange rates client
var ExchangeRatesClient *exchangeRates.Client
type ratesClient *exchangeRates.Client
func main() {
ExchangeRatesClient = exchangeRates.NewClient(...)
}
run this code and then see in my go.mod file:
module search
go 1.12
require (
github.com/mattevans/dinero v0.4.1-0.20191227041751-0242073870a1
)
same for go.sum file. Tried to do it manually, but doesn't work :(
Currently I have an use-case when I need convert a lot of currencies to another currencies in a row. In my code I need to do something like this:
client := // client creating
for _, currency := range currencies {
request := client.newRequest(...params)
rsp, _ := client.do(request)
}
Here is the problem: I need to do a lot of actions to just convert the currency :(
client := // client creating
for _, currency := range currencies {
rsp, _ := client.ConvertCurrency(currency, "USD")
}
WDYT about it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.