Go Package Mapper
 
 
Go to file
jolheiser afe09ba524
Add import and list commands, cleanup
Signed-off-by: jolheiser <john.olheiser@gmail.com>
2020-02-19 10:48:55 -06:00
cmd Add import and list commands, cleanup 2020-02-19 10:48:55 -06:00
modules/config Add import and list commands, cleanup 2020-02-19 10:48:55 -06:00
.gitignore Initial commit 2020-02-18 23:18:36 -06:00
Makefile Initial commit 2020-02-18 23:18:36 -06:00
README.md Add import and list commands, cleanup 2020-02-19 10:48:55 -06:00
go.mod Fix binary and add command 2020-02-18 23:39:54 -06:00
go.sum Initial commit 2020-02-18 23:18:36 -06:00
main.go Add import and list commands, cleanup 2020-02-19 10:48:55 -06:00

README.md

GPM

Go Package Mapping

Motivation

I personally use a lot of nice libraries in Go, but every time I start a new project I have to go hunting for import paths again!

Enter GPM, a glorified mapping of simple names to go-get imports.

For example, I use urfave/cli for all of my CLI projects. I've used it enough times to remember the import path, but let's say I didn't.
Using either a GPM server or local config, I can instead gpm get cli which finds cli in my map and runs go get github.com/urfave/cli/v2.

Commands

  • add - Add a local package
  • remove - Remove a local package
  • list - List local packages
  • config - Change local configuration (GPM server)
  • export - Export local packages to JSON
  • import - Import JSON to local packages

Server

If GPM doesn't find a package locally, it can call out to a configurable gpm server to find a package there.
This makes it much simpler to have a central library of packages rather than exporting and importing between environments.

The import and export commands should work between the CLI and server for easy transitions.