Skip to content

Commit

Permalink
feat: adjust apache header and recheck code
Browse files Browse the repository at this point in the history
  • Loading branch information
lhui authored and LinkinStars committed Jan 6, 2025
1 parent cded6aa commit d0b0cc7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
2 changes: 2 additions & 0 deletions notification-wecom/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Wecom Notification Plugin

[English](./README.md) | [中文](./README_CN.md)

## How to use

To use the notification-wecom plugin with your application, install it using the following command:
Expand Down
4 changes: 3 additions & 1 deletion notification-wecom/README_CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 企业微信通知插件

[English](./README.md) | [中文](./README_CN.md)

## 使用指南

要使用通知企业微信通知插件,请使用以下命令进行安装:
Expand Down Expand Up @@ -30,4 +32,4 @@ https://developer.work.weixin.qq.com/document/path/91770

## 致谢

感谢钉钉通知插件的开发,本插件很多代码参考壶或者直接沿用了钉钉通知插件的代码
感谢钉钉通知插件的开发,本插件很多代码参考或者直接沿用了钉钉通知插件的代码
5 changes: 3 additions & 2 deletions notification-wecom/go.mod
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module github.com/apache/incubator-answer-plugins/notification-wecom

go 1.23.4
go 1.22.0

require (
github.com/apache/incubator-answer v1.4.1
github.com/apache/incubator-answer-plugins/util v1.0.2
github.com/go-resty/resty/v2 v2.16.2
github.com/segmentfault/pacman v1.0.5-0.20230822083413-c0075a2d401f
)

require (
Expand Down Expand Up @@ -32,7 +34,6 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/segmentfault/pacman v1.0.5-0.20230822083413-c0075a2d401f // indirect
github.com/segmentfault/pacman/contrib/i18n v0.0.0-20230822083413-c0075a2d401f // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect
Expand Down
4 changes: 4 additions & 0 deletions notification-wecom/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn
github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY=
github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA=
github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM=
github.com/go-resty/resty/v2 v2.16.2 h1:CpRqTjIzq/rweXUt9+GxzzQdlkqMdt8Lm/fuK/CAbAg=
github.com/go-resty/resty/v2 v2.16.2/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU=
github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA=
github.com/goccy/go-json v0.10.3/go.mod h1:oq7eo15ShAhp70Anwd5lgX2pLfOS3QCiwU/PULtXL6M=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
Expand Down Expand Up @@ -126,6 +128,8 @@ golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224=
golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY=
golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U=
golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
Expand Down
20 changes: 20 additions & 0 deletions notification-wecom/notification_wecom.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

package wecom

import (
"embed"
"github.com/apache/incubator-answer/plugin"
"github.com/go-resty/resty/v2"
"strings"

wecomI18n "github.com/apache/incubator-answer-plugins/notification-wecom/i18n"
Expand Down

0 comments on commit d0b0cc7

Please sign in to comment.