command
module
Version:
v0.0.0-...-2d0ac4a
Opens a new window with list of versions in this module.
Published: Jan 12, 2022
License: GPL-3.0
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Plugin-Template
为 ZeroBot-Plugin-Dynamic 生成动态库插件。
使用方法
编写插件
复制main.go到本地或使用本模版,修改main.go的Inita函数为插件内容,语法与ZeroBot基本相同。
编译为动态库
使用Actions编译
- fork 本仓库
- 上传修改后的
main.go及其它新增文件。
- 创建形如
v1.2.3的tag,触发插件编译流程。
- 编译好后前往
Release页面下载即可。
本地编译
# 本机架构
go build -ldflags "-s -w" -buildmode=plugin -o demo.so
# 交叉编译:详见 workflow 相关代码
CGO_ENABLED=1 GOOS=linux GOARCH=arm GOARM=6 CC=arm-linux-gnueabihf-gcc-9 CXX=g++-9-arm-linux-gnueabihf go build -ldflags="-s -w" -buildmode=plugin -o artifacts/zbpd-linux-armv6
开始使用
放置动态库到ZeroBot-Plugin-Dynamic的plugins/目录下,给机器人发送/刷新插件即可,或重启也可加载。
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.