#!/bin/bash cd "$(dirname "$0")" go build -o ./test/client test.go if [ $? -eq 0 ]; then echo "编译成功!可执行文件位于: ./test/client" else echo "编译失败!" exit 1 fi