#!/bin/bash # 编译插件 go build -buildmode=plugin -o stats.so ./stats/stats.go # 检查编译结果 if [ $? -eq 0 ]; then echo "插件编译成功: stats.so" else echo "插件编译失败" exit 1 fi go build -buildmode=plugin -o logger.so ./logger/logger.go # 检查编译结果 if [ $? -eq 0 ]; then echo "插件编译成功: logger.so" else echo "插件编译失败" exit 1 fi