Giter Site home page Giter Site logo

go-converter-tests's Introduction

Converter Playground

This repository contains examples that make use of the given currency conversion library.

  • Fetch data using the currency layer service.
  • Fetching data using example (mock) data to demonstrate how different drivers would work.

How do I try them?

First, make sure you have GO installed in your computer. Please, follow this guide in the case you do not have GO installed in your computer yet.

Second, you will have to clone this project to you local machine and cd into the cloned folder. Like so:

[email protected]:voyago/converter-tests.git

cd converter-tests

Third, you would have to create an .env file in order for you to run these examples since the given library is environment aware. Thus, it needs this information to resolve desired drivers.

You can do this by typing the following.

cp .prod.env.example .env

Lastly, you would be able to run the program by typing the following command from your command line

go run main.go

Example output

 gus@gocanto  ~/Sites/converter-test   main  go run main.go

+ --------------------------------------------------- +
|          CURRENCY LAYER API DATA                    |
+ --------------------------------------------------- +

--- Environment
App name: converter-test
App env: production [live?: true]

--- Currencies exchange rate
Available currencies rate: 157
USD rate: 0.736022

--- Conversions
Result: [SGD 1.00], Amount: [1.00]

+ --------------------------------------------------- +
|               TESTING DATA                          |
+ --------------------------------------------------- +

--- Environment
App name: converter-test
App env: local [live?: false]

--- Currencies exchange rate
Available currencies rate: 157
SGD rate: 1.34258

--- Conversions
Result: [SGD 0.74], Amount: [0.74]

Contributing

Please, feel free to fork this repository to contribute to it by submitting a functionalities/bugs-fixes pull request to enhance it.

License

Please see License File for more information.

How can I thank you?

Why not star this GitHub repository and share its link on your social network?

Don't forget to follow me on twitter!

go-converter-tests's People

Contributors

gocanto avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.