Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.降低使用门槛,尤其是恼人的goproxy代理,2.支持Makefile 3.增加telegram文字通知 #48

Closed
wants to merge 1 commit into from

Conversation

yanjinbin
Copy link

telegram尚未经过测试 应该没啥问题 比较easy
其他都玩过 功能ok

@zc2638
Copy link
Owner

zc2638 commented Apr 17, 2022

感谢 Contribute!

Comment on lines +3 to +4
token: "**09724:AAEW***KhR**"
chat_id: "89***381"
Copy link
Owner

@zc2638 zc2638 Apr 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

默认配置 建议留空,很多用户不会使用telegram,也不会修改这里的配置,将会在通知的时候报错。
如果需要example,可以在注释提示

}

func NewTelegramBot(cf *TelegramBotConf) *TelegramBot {
return &TelegramBot{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

参考:https://github.com/zc2638/ddshop/blob/main/pkg/notice/notice.go#L32-L41
这里判断一下如果必要的配置不存在,返回一个 nil 用于不初始化 TelegramBot 实例,并且返回参数应该是 Engine Interface

Comment on lines +6 to +7
content: "搞快点,速来叮咚买菜小程序付钱!"
title: "🔥我,秦始皇,打钱"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通知内容目前统一由代码层面处理,后续可以考虑统一抽出来。因为要作用于 所有通知服务

@zc2638
Copy link
Owner

zc2638 commented Apr 17, 2022

format无须添加make命令,可以增加golanglint-ci强制

@yanjinbin
Copy link
Author

好的 我cancel了 sorry 我是自己使用怎么来 没太考虑friendly

@yanjinbin yanjinbin closed this Apr 17, 2022
@zc2638
Copy link
Owner

zc2638 commented Apr 17, 2022

可以把 PR 稍微修改一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants