From 7fa23b9b3144d1cd63c1ed5e4e4cc2502ed21458 Mon Sep 17 00:00:00 2001 From: Buddy Sandidge Date: Thu, 25 May 2023 15:04:16 -0700 Subject: [PATCH] Convert go stow to chezmoi --- .../profile.d/go.sh => dot_config/profile/profile.d/go.sh.tmpl | 2 ++ .../vim/ftplugin/go.vim => dot_config/vim/ftplugin/go.vim.tmpl | 2 ++ dot_config/vim/plug.d/go.vim.tmpl | 3 +++ .../snips/go.snippets => dot_config/vim/snips/go.snippets.tmpl | 2 ++ .../bin/executable_install-go-grpc-gateway | 0 .../bin/executable_install-go-home | 0 .../bin/executable_install-go-junit-report | 0 .../bin/executable_install-go-swagger | 0 .../bin/executable_install-go-system | 0 .../bin/executable_install-gofumpt | 0 .../bin/executable_install-golangci-lint | 0 .../bin/executable_install-gomock-home | 0 .../bin/executable_install-protobuf-go | 0 .../bin/executable_install-protoc-gen-go-grpc | 0 .../bin/executable_install-staticcheck | 0 go/.config/vim/plug.d/go.vim | 1 - 16 files changed, 9 insertions(+), 1 deletion(-) rename go/.config/profile/profile.d/go.sh => dot_config/profile/profile.d/go.sh.tmpl (89%) rename go/.config/vim/ftplugin/go.vim => dot_config/vim/ftplugin/go.vim.tmpl (91%) create mode 100644 dot_config/vim/plug.d/go.vim.tmpl rename go/.config/vim/snips/go.snippets => dot_config/vim/snips/go.snippets.tmpl (95%) rename go/.local/bin/install-go-grpc-gateway => dot_local/bin/executable_install-go-grpc-gateway (100%) rename go/.local/bin/install-go-home => dot_local/bin/executable_install-go-home (100%) mode change 100755 => 100644 rename go/.local/bin/install-go-junit-report => dot_local/bin/executable_install-go-junit-report (100%) rename go/.local/bin/install-go-swagger => dot_local/bin/executable_install-go-swagger (100%) rename go/.local/bin/install-go-system => dot_local/bin/executable_install-go-system (100%) mode change 100755 => 100644 rename go/.local/bin/install-gofumpt => dot_local/bin/executable_install-gofumpt (100%) rename go/.local/bin/install-golangci-lint => dot_local/bin/executable_install-golangci-lint (100%) mode change 100755 => 100644 rename go/.local/bin/install-gomock-home => dot_local/bin/executable_install-gomock-home (100%) mode change 100755 => 100644 rename go/.local/bin/install-protobuf-go => dot_local/bin/executable_install-protobuf-go (100%) rename go/.local/bin/install-protoc-gen-go-grpc => dot_local/bin/executable_install-protoc-gen-go-grpc (100%) rename go/.local/bin/install-staticcheck => dot_local/bin/executable_install-staticcheck (100%) delete mode 100644 go/.config/vim/plug.d/go.vim 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'