Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jakoblorz committed Jan 31, 2018
1 parent 13af638 commit a9546df
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# godpkg
Ever wondered why setting up Go Environments is so complicated? Then this Package Manager is for you! godpkg (pronounced *god*-pkg or *go*-dpkg? :stuck_out_tongue_winking_eye:) keeps track of the dependencies you install using a plain file (*./packages*) which allows you the reinstall dependecies later. Furthermore, the scripts to **build** and **install** set their own GOPATH thus keep all dependencies in your folder structure (just like in *node_modules* when using *npm*).
Go Environments use a opinionated project structure, which is why I scripted my Environment to manually switch between GOPATHs and symlink already existing versions of a dependency. `godpkg` is a cli-app which allows you to use the same scripts without having to manually copy them. Decide if you want to install a dependency in *local* scope (downloads / `go get`) right into your project folder or install it globally (*global* scope, downloads it into `~/.go-env`, symlinks into your project). Get started with the `godpkg init` command.

With this package manager I want to lower the entry barrier for newcomers who might be overwhelmed by the complicated and centralized setup process for Go Environments, but please (Quoting @nathany) [Recognize that **Go is different**](https://nathany.com/go-packages/). I advise you to switch to more common managers embraced by the Go Community later.
People should be free to choose whatever package manager they might like which is why I will list popular go package managers:
## Status
At this point this project is just a compilation of scripts I personally used into a small cli-app. There are more features planned but if you want to get a proper package manager people use in production environments today, please switch to more popular / established package managers:
- [dep](https://github.com/golang/dep)
- [godep](https://github.com/tools/godep)
- [gb](https://github.com/constabulary/gb) - Thank you, [MoneyWorthington](https://www.reddit.com/r/programming/comments/7u4eyz/gopath_independent_go_package_manager_wip/dthnbz9/)
- [glide](https://github.com/Masterminds/glide)

If you want to add more, feel free to PR and if you like this project, :star: it!
### Planned Features
- [ ] Snapshoting Versioned Dependencies when installing in Global Scope
- [ ] Windows Support
- [ ] Release Command to copy dependencies into `/vendor`

## Install
```bash
Expand All @@ -18,7 +22,7 @@ curl -sL http://github.com/jakoblorz/godpkg/raw/master/bin/godpkg > /usr/local/b
```bash
godpkg init <name>
```
You can then `cd` into the created folder and execute all the other command with the shell's `cwd` pointing to the root of the project.
You can then `cd` into the folder and execute all the other commands.

### (Re-) Install Dependencies
To install specific dependencies, you can use the install command. `go get ...` is used under the hood. If you want to install the dependency directly (into the current project structure), choose **local**. Otherwise (**global**) the dependencies will be installed into `~/.go-env` and symlinked into the project folder (linking *bin, pkg and src*). Similar to a "normal" Go Environment with fixed GOPATH, dependencies can be shared between different projects which reduces the footprint significantly.
Expand Down

0 comments on commit a9546df

Please sign in to comment.