Skip to content

simple and fast, file based and GOPATH independent golang package manager

License

Notifications You must be signed in to change notification settings

jakoblorz/godpkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

godpkg

GitHub Stats

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.

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:

Planned Features

  • Snapshoting Versioned Dependencies when installing in Global Scope
  • Windows Support
  • Release Command to copy dependencies into /vendor

Install

curl -sL https://github.com/jakoblorz/godpkg/releases/download/v0.2.2-alpha/godpkg-0.2.2-amd_64 > /usr/local/bin/godpkg && chmod +x /usr/local/bin/godpkg

Usage

Initialize Project Folder

godpkg init <name>

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.

godpkg install <local|global> github.com/user/...

When omitting all arguments (godpkg install), godpkg will read the ./packages file and install the listed dependencies (even with the original local/global scope).

Build your Project

If you call build, the file in src/<foldername>.go will be built.

godpkg build

About

simple and fast, file based and GOPATH independent golang package manager

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages