penguin/utils

my env utils

commit 248dc44eec2d05ee261bc44c2a9e8a6a658a5e71

author斟酌 鵬兄 <tgckpg@gmail.com>
date2022-09-12T10:41:23Z
subjectMake some go compiler commands available
commit 248dc44eec2d05ee261bc44c2a9e8a6a658a5e71
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2022-09-12T10:41:23Z

    Make some go compiler commands available
---
 bash/sources/40_go-command | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/bash/sources/40_go-command b/bash/sources/40_go-command
index 356550d..4a11b03 100755
--- a/bash/sources/40_go-command
+++ b/bash/sources/40_go-command
@@ -29,19 +29,25 @@ function _begin_sel() {
 }
 
 function go() {
-	local i
+	local i _GO
     ARG1=$1; ARG2=$2; ARG3=$3;
 
     if [[ -z "$ARG1" ]]; then
         __func_head "[MODE] SITE TARGET_DIR [..SLICE]"
         __func_help "up [MODE] TARGET_DIR"
         __func_help "down [MODE] TARGET_DIR [..SLICE]"
+		__func_help "compiler commands use \"go help\""
         echo
         return 1
     fi
 
     NAV=false
     case "$ARG1" in
+		bug|build|clean|doc|env|fix|fmt|generate|get|install|list|mod|work|run|test|tool|version|vet|help)
+			_GO=$( which go )
+			$_GO $@
+			return $?
+			;;
         p)
             shift
             CC='pushd' ;;