Currently I have a small project that consumes CSV data and instead of rewriting or copy/paste the code, I'd like to know if it's possible to make the functions work standalone / importable stuff.
Something like the pgconfig has made. They have a project structure like that:
.
├── cmd
│ ├── api # cobra command
│ └── pgconfigctl # cobra command
├── pkg # commands functionalities that can be imported (used by cmd folder)
│ ├── category
│ ├── defaults
│ ├── docs
│ ├── errors
│ ├── format
│ ├── input
│ ├── rules
│ └── version
├── go.mod
└── go.sum
Prerequisites
csvtk version
Describe your issue
Currently I have a small project that consumes CSV data and instead of rewriting or copy/paste the code, I'd like to know if it's possible to make the functions work standalone / importable stuff.
Something like the pgconfig has made. They have a project structure like that:
Then we can use the pkg from other projects like:
So users can do somethink like, on their own code: