Socket
Book a DemoInstallSign in
Socket

github.com/valanced/currency-converter

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/valanced/currency-converter

Source
Go
Version
v0.0.0-20240927160104-986f071dbf7b
Version published
Created
Source

Currency Converter Project

This project is a simple Currency Converter CLI application built in Go, designed to interact with external services for fetching conversion rates and performing currency conversions. The project utilizes dependency injection and clean architecture principles to maintain separation of concerns and ensure testability.

Requirements

•	Go 1.18 or later
•	gomock
•	golangci-lint

Setup

  • Clone the repository:
git clone https://github.com/valanced/currency-converter.git
cd currency-converter 
  • Install dependencies:
go mod tidy
  • Run the application:
COINMARKETCAP_API_KEY=xxx /bin/currency-converter 12 BTC USD

This will execute all unit tests in the project and provide a detailed output of the results.

Future Improvements

  • Linter Setup: It’s important to integrate a linter like golangci-lint to enforce code quality and style guidelines across the codebase.
  • Configuration: The application currently uses a basic .env file for configuration, but it should be replaced with a more robust configuration management system (e.g., viper or envconfig) to support different environments and settings.
  • Makefile: The current Makefile is a preliminary version, providing basic commands for building and testing. It should be expanded and refined to better suit a production environment, including commands for deployment, linting, and advanced testing scenarios.

FAQs

Package last updated on 27 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts