diff --git a/go/.config/profile/profile.d/go.sh b/dot_config/profile/profile.d/go.sh.tmpl similarity index 89% rename from go/.config/profile/profile.d/go.sh rename to dot_config/profile/profile.d/go.sh.tmpl index ae12dba..14233e7 100644 --- a/go/.config/profile/profile.d/go.sh +++ b/dot_config/profile/profile.d/go.sh.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "go" -}} __APPS_GO_PATH=/usr/local/apps/golang/current/bin if [ -d "${__APPS_GO_PATH}" ] && ! echo "${PATH}" | grep -q ${__APPS_GO_PATH} ; then PATH="$__APPS_GO_PATH:${PATH}" @@ -7,3 +8,4 @@ unset __APPS_GO_PATH if [ -d "${HOME}/go/bin" ] && ! echo "$PATH" | grep -q "${HOME}/go/bin" ; then PATH="${PATH}:${HOME}/go/bin" fi +{{- end }} diff --git a/go/.config/vim/ftplugin/go.vim b/dot_config/vim/ftplugin/go.vim.tmpl similarity index 91% rename from go/.config/vim/ftplugin/go.vim rename to dot_config/vim/ftplugin/go.vim.tmpl index 0eaf908..707b13b 100644 --- a/go/.config/vim/ftplugin/go.vim +++ b/dot_config/vim/ftplugin/go.vim.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "go" -}} set noexpandtab " use goimports for formatting @@ -13,3 +14,4 @@ let g:go_highlight_build_constraints = 1 " Open go doc in vertical window, horizontal, or tab nnoremap d :GoDef nnoremap t :GoDefType +{{- end }} diff --git a/dot_config/vim/plug.d/go.vim.tmpl b/dot_config/vim/plug.d/go.vim.tmpl new file mode 100644 index 0000000..0a94c6d --- /dev/null +++ b/dot_config/vim/plug.d/go.vim.tmpl @@ -0,0 +1,3 @@ +{{ if lookPath "go" -}} +Plug 'fatih/vim-go' +{{- end }} diff --git a/go/.config/vim/snips/go.snippets b/dot_config/vim/snips/go.snippets.tmpl similarity index 95% rename from go/.config/vim/snips/go.snippets rename to dot_config/vim/snips/go.snippets.tmpl index dac6f2f..655be46 100644 --- a/go/.config/vim/snips/go.snippets +++ b/dot_config/vim/snips/go.snippets.tmpl @@ -1,3 +1,4 @@ +{{ if lookPath "go" -}} snippet ignore "ignore function" ! func(...any) {}(${1}) endsnippet @@ -43,3 +44,4 @@ func Test${1}(t *testing.T) { } } endsnippet +{{- end }} diff --git a/go/.local/bin/install-go-grpc-gateway b/dot_local/bin/executable_install-go-grpc-gateway similarity index 100% rename from go/.local/bin/install-go-grpc-gateway rename to dot_local/bin/executable_install-go-grpc-gateway diff --git a/go/.local/bin/install-go-home b/dot_local/bin/executable_install-go-home old mode 100755 new mode 100644 similarity index 100% rename from go/.local/bin/install-go-home rename to dot_local/bin/executable_install-go-home diff --git a/go/.local/bin/install-go-junit-report b/dot_local/bin/executable_install-go-junit-report similarity index 100% rename from go/.local/bin/install-go-junit-report rename to dot_local/bin/executable_install-go-junit-report diff --git a/go/.local/bin/install-go-swagger b/dot_local/bin/executable_install-go-swagger similarity index 100% rename from go/.local/bin/install-go-swagger rename to dot_local/bin/executable_install-go-swagger diff --git a/go/.local/bin/install-go-system b/dot_local/bin/executable_install-go-system old mode 100755 new mode 100644 similarity index 100% rename from go/.local/bin/install-go-system rename to dot_local/bin/executable_install-go-system diff --git a/go/.local/bin/install-gofumpt b/dot_local/bin/executable_install-gofumpt similarity index 100% rename from go/.local/bin/install-gofumpt rename to dot_local/bin/executable_install-gofumpt diff --git a/go/.local/bin/install-golangci-lint b/dot_local/bin/executable_install-golangci-lint old mode 100755 new mode 100644 similarity index 100% rename from go/.local/bin/install-golangci-lint rename to dot_local/bin/executable_install-golangci-lint diff --git a/go/.local/bin/install-gomock-home b/dot_local/bin/executable_install-gomock-home old mode 100755 new mode 100644 similarity index 100% rename from go/.local/bin/install-gomock-home rename to dot_local/bin/executable_install-gomock-home diff --git a/go/.local/bin/install-protobuf-go b/dot_local/bin/executable_install-protobuf-go similarity index 100% rename from go/.local/bin/install-protobuf-go rename to dot_local/bin/executable_install-protobuf-go diff --git a/go/.local/bin/install-protoc-gen-go-grpc b/dot_local/bin/executable_install-protoc-gen-go-grpc similarity index 100% rename from go/.local/bin/install-protoc-gen-go-grpc rename to dot_local/bin/executable_install-protoc-gen-go-grpc diff --git a/go/.local/bin/install-staticcheck b/dot_local/bin/executable_install-staticcheck similarity index 100% rename from go/.local/bin/install-staticcheck rename to dot_local/bin/executable_install-staticcheck diff --git a/go/.config/vim/plug.d/go.vim b/go/.config/vim/plug.d/go.vim deleted file mode 100644 index 57df865..0000000 --- a/go/.config/vim/plug.d/go.vim +++ /dev/null @@ -1 +0,0 @@ -Plug 'fatih/vim-go'