Categorygithub.com/Abdulsametileri/go-binary-version-manager

# README

go-binary-version-manager (gbvm)

Version manager of libraries which installed via go install command.

🔨Build And Test

Go Report Card

Motivation

The projects I worked on used different versions of the golangci-lint and mockery libraries. When I use their commands, inconsistent, strange errors occur. I am aiming to solve this problem by writing a basic binary manager that uses symlink under the hood.

This project is not specific to golangci-lint, mockery. You can use any library you want. The condition is the library must be installed via go install command.

Note: Executable binaries must be within ($GOPATH/go/bin) before using gbvm. For example, if you installed golangci-lint via homebrew, you need to delete it first. You should install with gbvm install command. Please check demo.

Demo

asciicast

Installation

via Brew

brew install abdulsametileri/tap/gbvm

Behind the scenes

behind-the-scenes.png

Commands

CommandExplanationExample
gbvm listall $LIBRARYit lists all installed versions of the given librarygbvm listall mockery
gbvm enable $LIBRARY@$VERSIONit enables given version of the librarygbvm enable [email protected]
gbvm install $packageit installs given version of the librarygbvm install github.com/vektra/mockery/[email protected]
gbvm uninstall $packageit uninstalls given version of the librarygbvm uninstall github.com/vektra/mockery/[email protected]

Having issue

Enable logs

You can enable debug logs via -v=5
    
gbvm enable [email protected] -v=5
    
PanicLevel (0), Fatal (1), Error (2)
Warn (3), Info (4), Debug (5), Trace (6)

Check your zshrc/bashrc

This library heavily used `go env GOPATH`, please check
export PATH=$PATH:$(go env GOPATH)/bin
defined your zshrc/bashrc

# Packages

No description provided by the author
No description provided by the author