# ding_pigeon **Repository Path**: ser163/ding_pigeon ## Basic Information - **Project Name**: ding_pigeon - **Description**: 一个用go语言实现的钉钉消息接口. - **Primary Language**: Go - **License**: Apache-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-07-04 - **Last Updated**: 2024-05-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: 钉钉, 报警, 群发, 运维 ## README # ding_pigeon 一个go语言编写与钉钉机器人接口的程序 ## 使用说明 您可以使用以下命令来运行此程序: * 通过管道发送文本消息:`echo "Hello World" | dpigeon` * 发送文本消息:`dpigeon -type=text -content="Hello World"` * 发送链接消息:`dpigeon -type=link -title="Link Title" -content="Link Content" -url="https://example.com" -pic="https://example.com/pic.jpg"` * 发送 Markdown 消息:`dpigeon -type=markdown -title="Markdown Title" -content="# Markdown Content"` ## 配置说明 将config.yaml.bak 改名为config.yaml ```yaml webhook: https://oapi.dingtalk.com/robot/send?access_token=YOUR_ACCESS_TOKEN_HERE secret: YOUR_SECRET_HERE ``` ## 编译 Linux编译 ```shell go build -ldflags "-s -w" -o dpingeon main.go ``` windows下交叉编译 ```shell set GOOS=linux set GOARCH=amd64 go build -ldflags "-s -w" -o dpingeon main.go ```