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

feat: umeng broadcast message #153

Merged
merged 2 commits into from
Jan 11, 2025
Merged

feat: umeng broadcast message #153

merged 2 commits into from
Jan 11, 2025

Conversation

jiuxia211
Copy link
Contributor

@jiuxia211 jiuxia211 commented Jan 11, 2025

自查 PR 结构

  • PR 标题符合这个格式: <type>(optional scope): <description>

  • 此 PR 标题的描述以用户为导向,足够清晰,其他人可以理解。

  • 我已经对所有 commit 提供了签名(GPG 密钥签名、SSH 密钥签名)

  • 这个 PR 属于强制变更/破坏性更改

如果是,请在 PR 标题中添加 BREAKING CHANGE 前缀,并在 PR 描述中详细说明。

这个 PR 的类型是什么?

这个 PR 做了什么 / 我们为什么需要这个 PR?

(可选)这个 PR 解决了哪个/些 issue?

对 Reviewer 预留的一些提醒

@jiuxia211 jiuxia211 requested review from mutezebra, ozline and a team as code owners January 11, 2025 11:52
Copy link

codecov bot commented Jan 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 83 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/umeng/broadcast.go 0.00% 82 Missing ⚠️
config/config.go 0.00% 1 Missing ⚠️
@@           Coverage Diff            @@
##            main    #153      +/-   ##
========================================
- Coverage   3.12%   3.11%   -0.01%     
========================================
  Files        184     185       +1     
  Lines      38335   38418      +83     
========================================
  Hits        1197    1197              
- Misses     37073   37156      +83     
  Partials      65      65              
Flag Coverage Δ
unittest 3.11% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
config/config.go 0.00% <0.00%> (ø)
pkg/umeng/broadcast.go 0.00% <0.00%> (ø)

@ozline
Copy link
Member

ozline commented Jan 11, 2025

@penqee 来 check,没问题的话 approve 然后合了


req, err := http.NewRequest("POST", url+"?sign="+sign, bytes.NewBuffer(postBody))
if err != nil {
return fmt.Errorf("umeng.sendBroadcast : failed to create request: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

这里应该用 errno.Errorf 吧. 这里是错误产生的地方, 我们需要调用栈

client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
return fmt.Errorf("umeng.sendBroadcast : failed to send request: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

同上, 下面的也一样

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

Copy link
Member

@mutezebra mutezebra left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@renbaoshuo renbaoshuo left a comment

Choose a reason for hiding this comment

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

LGTM

@jiuxia211 jiuxia211 merged commit 401ad9f into west2-online:main Jan 11, 2025
6 of 7 checks passed
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.

4 participants