Skip to content

Commit 49f53f6

Browse files
committed
feat: bump to v2
```sh rg -l 'xen0n/go-workwx' **/*.go | xargs sed -i 's@xen0n/go-workwx@xen0n/go-workwx/v2@' ``` with the only false match (user_info_helper.go) manually fixed
1 parent 3a03fa6 commit 49f53f6

File tree

17 files changed

+20
-20
lines changed

17 files changed

+20
-20
lines changed

cmd/workwxctl/commands/cmd_dept_list.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"fmt"
55
"strconv"
66

7-
"github.com/xen0n/go-workwx"
7+
"github.com/xen0n/go-workwx/v2"
88

99
"github.com/urfave/cli/v2"
1010
)

cmd/workwxctl/commands/cmd_send_message.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/urfave/cli/v2"
77

8-
"github.com/xen0n/go-workwx"
8+
"github.com/xen0n/go-workwx/v2"
99
)
1010

1111
func cmdSendMessage(c *cli.Context) error {

cmd/workwxctl/commands/cmd_upload_temp_media.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
"github.com/urfave/cli/v2"
88

9-
"github.com/xen0n/go-workwx"
9+
"github.com/xen0n/go-workwx/v2"
1010
)
1111

1212
func cmdUploadTempMedia(c *cli.Context) error {

cmd/workwxctl/commands/cmd_webhook_send_message.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/urfave/cli/v2"
77

8-
"github.com/xen0n/go-workwx"
8+
"github.com/xen0n/go-workwx/v2"
99
)
1010

1111
func cmdWebhookSendMessage(c *cli.Context) error {

cmd/workwxctl/commands/decl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package commands
33
import (
44
"github.com/urfave/cli/v2"
55

6-
"github.com/xen0n/go-workwx"
6+
"github.com/xen0n/go-workwx/v2"
77
)
88

99
// InitApp defines the workwxctl CLI.

cmd/workwxctl/commands/flags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77

88
"github.com/urfave/cli/v2"
99

10-
"github.com/xen0n/go-workwx"
10+
"github.com/xen0n/go-workwx/v2"
1111
)
1212

1313
const (

cmd/workwxctl/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"os"
55

6-
"github.com/xen0n/go-workwx/cmd/workwxctl/commands"
6+
"github.com/xen0n/go-workwx/v2/cmd/workwxctl/commands"
77
)
88

99
func main() {

errors.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package workwx
33
import (
44
"fmt"
55

6-
"github.com/xen0n/go-workwx/errcodes"
6+
"github.com/xen0n/go-workwx/v2/errcodes"
77
)
88

99
// WorkwxClientError 企业微信客户端 SDK 的响应错误

example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"strconv"
66
"time"
77

8-
"github.com/xen0n/go-workwx"
8+
"github.com/xen0n/go-workwx/v2"
99
)
1010

1111
const (

examples/callback-demo/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"fmt"
88
"net/http"
99

10-
"github.com/xen0n/go-workwx"
10+
"github.com/xen0n/go-workwx/v2"
1111
)
1212

1313
type dummyRxMessageHandler struct{}

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/xen0n/go-workwx
1+
module github.com/xen0n/go-workwx/v2
22

33
go 1.17
44

internal/lowlevel/encryptor/mod.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"errors"
1010
"io"
1111

12-
"github.com/xen0n/go-workwx/internal/lowlevel/pkcs7"
12+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/pkcs7"
1313
)
1414

1515
type WorkwxPayload struct {

internal/lowlevel/envelope/mod.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"net/url"
1010
"strconv"
1111

12-
"github.com/xen0n/go-workwx/internal/lowlevel/encryptor"
13-
"github.com/xen0n/go-workwx/internal/lowlevel/signature"
12+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/encryptor"
13+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/signature"
1414
)
1515

1616
type Processor struct {

internal/lowlevel/httpapi/echo_test_api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"net/url"
77
"strconv"
88

9-
"github.com/xen0n/go-workwx/internal/lowlevel/signature"
9+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/signature"
1010
)
1111

1212
type ToEchoTestAPIArgs interface {

internal/lowlevel/httpapi/event_api.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"io/ioutil"
55
"net/http"
66

7-
"github.com/xen0n/go-workwx/internal/lowlevel/envelope"
7+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/envelope"
88
)
99

1010
type EnvelopeHandler interface {

internal/lowlevel/httpapi/mod.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package httpapi
33
import (
44
"net/http"
55

6-
"github.com/xen0n/go-workwx/internal/lowlevel/encryptor"
7-
"github.com/xen0n/go-workwx/internal/lowlevel/envelope"
6+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/encryptor"
7+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/envelope"
88
)
99

1010
type LowlevelHandler struct {

rx.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package workwx
33
import (
44
"net/http"
55

6-
"github.com/xen0n/go-workwx/internal/lowlevel/envelope"
7-
"github.com/xen0n/go-workwx/internal/lowlevel/httpapi"
6+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/envelope"
7+
"github.com/xen0n/go-workwx/v2/internal/lowlevel/httpapi"
88
)
99

1010
// RxMessageHandler 用来接收消息的接口。

0 commit comments

Comments
 (0)