Skip to content

Virtual GOPATH for module enabled projects

License

Notifications You must be signed in to change notification settings

ironcore-dev/vgopath

Folders and files

NameName
Last commit message
Last commit date
Oct 28, 2024
Nov 17, 2023
Nov 17, 2023
Nov 17, 2023
Apr 24, 2024
Nov 17, 2023
Apr 6, 2022
Nov 2, 2023
Nov 17, 2023
Apr 6, 2022
Aug 27, 2024
Nov 17, 2023
Feb 3, 2025
Feb 3, 2025
Nov 17, 2023

vgopath

REUSE status GitHub License Go Report Card PRs Welcome

vgopath is a tool for module-enabled projects to set up a 'virtual' GOPATH for legacy tools to run with (kubernetes/code-generator I'm looking at you...).

Installation

The simplest way to install vgopath is by running

go install github.com/ironcore-dev/vgopath@latest

Usage

vgopath has to be run from the module-enabled project root. It requires a target directory to construct the virtual GOPATH.

Example usage could look like this:

# Create the target directory
mkdir -p my-vgopath

# Do the linking in my-vgopath
vgopath -o my-vgopath

Once done, the structure will look something like

my-vgopath
├── bin -> <GOPATH>/bin
├── pkg -> <GOPATH>/pkg
└── src -> various subdirectories