mirror of
https://codeberg.org/muon/home.git
synced 2026-03-08 03:25:16 +00:00
Add hr init go
This commit is contained in:
parent
a3bd6990b5
commit
2fa75b084b
1 changed files with 17 additions and 0 deletions
|
|
@ -10,6 +10,7 @@ _hr_usage() {
|
||||||
echo " call Call a Cloud Run service route"
|
echo " call Call a Cloud Run service route"
|
||||||
echo " cf Call a Cloud Function"
|
echo " cf Call a Cloud Function"
|
||||||
echo " init py Initialize a python devenv environment (git-ignored)"
|
echo " init py Initialize a python devenv environment (git-ignored)"
|
||||||
|
echo " init go Initialize a go devenv environment (git-ignored)"
|
||||||
echo " freeze Freeze dependencies to requirements.txt"
|
echo " freeze Freeze dependencies to requirements.txt"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -137,6 +138,16 @@ in {
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_hr_go_files() {
|
||||||
|
cat <<EOF >devenv.nix
|
||||||
|
{pkgs, ...}: {
|
||||||
|
languages.go = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
}
|
||||||
|
|
||||||
_hr_init_base() {
|
_hr_init_base() {
|
||||||
local name="$1"
|
local name="$1"
|
||||||
local func="$2"
|
local func="$2"
|
||||||
|
|
@ -186,6 +197,10 @@ _hr_init_cpp() {
|
||||||
cp compile_commands.json ..
|
cp compile_commands.json ..
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_hr_init_go() {
|
||||||
|
_hr_init_base "Go" _hr_go_files
|
||||||
|
}
|
||||||
|
|
||||||
_hr_freeze() {
|
_hr_freeze() {
|
||||||
local extra_index_url="https://europe-west1-python.pkg.dev/mk2-prod/python-packages/simple/"
|
local extra_index_url="https://europe-west1-python.pkg.dev/mk2-prod/python-packages/simple/"
|
||||||
|
|
||||||
|
|
@ -376,6 +391,8 @@ hr() {
|
||||||
_hr_init_py
|
_hr_init_py
|
||||||
elif [ "$1" = "init" ] && [ "$2" = "rs" ]; then
|
elif [ "$1" = "init" ] && [ "$2" = "rs" ]; then
|
||||||
_hr_init_rs
|
_hr_init_rs
|
||||||
|
elif [ "$1" = "init" ] && [ "$2" = "go" ]; then
|
||||||
|
_hr_init_go
|
||||||
elif [ "$1" = "init" ] && [ "$2" = "cpp" ]; then
|
elif [ "$1" = "init" ] && [ "$2" = "cpp" ]; then
|
||||||
_hr_init_cpp
|
_hr_init_cpp
|
||||||
elif [ "$1" = "freeze" ]; then
|
elif [ "$1" = "freeze" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue