howeyc / ledger

Command line double-entry accounting program
https://howeyc.github.io/ledger/
ISC License
461 stars 43 forks source link

Request: move decimal package out of internal #40

Closed whereswaldon closed 1 year ago

whereswaldon commented 1 year ago

The fact that decimal is in a internal directory means it's impossible for application code in consuming projects to construct *ledger.Transactions at runtime (except by parsing a string representation of them). This makes it hard to build a tool capable of authoring new transactions. Is there a reason that decimal must live in internal?

Regardless, thanks for the great work on this package!

howeyc commented 1 year ago

That's a good point I didn't think about. I made it internal because it's not "general purpose" and quite specific for use within ledger.

You're right though, it should be available enough to be used if anyone wants to interface with the ledger package.

whereswaldon commented 1 year ago

Thank you!