mer

package module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 4 Imported by: 0

README

mer

CLI to convert currency.

CI

Usage

Usage: mer <from> <to> [<src>]

Arguments:
  <from>     Exchange source currency code.
  <to>       Exchange destination currency code.
  [<src>]    Exchange source.

Flags:
  -h, --help       Show help.
  -c, --comma      Add comma to a number.
      --version
$ mer usd jpy 3
427.203

$ echo 1.53 | mer usd eur
1.36185

$ mer usd jpy 3000
21

$ mer usd jpy 3,000 # comma will be deleted
21

$ mer usd jpy 1000
142401

$ mer -c usd jpy 1000
142,401

Installation

brew install winebarrel/mer/mer

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exchange

func Exchange(from string, to string, src decimal.Decimal) (decimal.Decimal, error)

func ExchangeContext

func ExchangeContext(ctx context.Context, from string, to string, src decimal.Decimal) (decimal.Decimal, error)

Types

This section is empty.

Directories

Path Synopsis
cmd
mer
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL