Home projects. General area for mucking about with Golang using ideas from articles on the internet.
which can be installed by executing:
export BIN="~/bin"
curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to ${BIN}
just
to see which commands are available.
Create all local bin directories:
mkdir -p ~/bin
mkdir -p ~/go/bin
mkdir -p ~/.local/bin
mkdir -p ~/.local/go/bin
The file ~/.profile should contain the following lines to setup PATH correctly:
# set these in the correct order
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private local bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
# set PATH so it includes user's local go bin if it exists
if [ -d "$HOME/.local/go/bin" ] ; then
PATH="$HOME/.local/go/bin:$PATH"
fi
# set PATH so it includes user's go bin if it exists
if [ -d "$HOME/go/bin" ] ; then
PATH="$HOME/go/bin:$PATH"
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "$HOME/.cargo/env" ] && \. "$HOME/.cargo/env"
In order to make these settings permanent, logout or reboot your PC.
First check for the presence of Go and other tools.
just tools which
Note: installation of Go is done locally in ~/.local/go as opposed to the normal location of /usr/local/go. This is so sudo is not required. Uninstall Go in /usr/local/go before attempting to install any tools.
Install tools like so:
just tools install
Initialise generated code and modules
just generate
just qa
Edit or add code or other development activity.
If any source files for generated code has changed:
just generate
Quality check code:
just qa
And build any new executables:
just build