File tree Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Expand file tree Collapse file tree 2 files changed +21
-19
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ package main
21
21
import (
22
22
"fmt"
23
23
"log"
24
- "os"
25
- "os/signal"
26
24
"time"
27
25
28
26
"github.com/wechaty/go-wechaty/wechaty"
@@ -41,18 +39,7 @@ func main() {
41
39
fmt .Printf ("User %s logouted: %s\n " , user , reason )
42
40
})
43
41
44
- var err = bot .Start ()
45
- if err != nil {
46
- panic (err )
47
- }
48
-
49
- var quitSig = make (chan os.Signal )
50
- signal .Notify (quitSig , os .Interrupt , os .Kill )
51
-
52
- select {
53
- case <- quitSig :
54
- log .Fatal ("exit.by.signal" )
55
- }
42
+ bot .DaemonStart ()
56
43
}
57
44
58
45
func onMessage (ctx * wechaty.Context , message * user.Message ) {
Original file line number Diff line number Diff line change 1
1
module github.com/wechaty/go-wechaty-getting-started
2
2
3
- go 1.14
3
+ go 1.18
4
+
5
+ require github.com/wechaty/go-wechaty v0.3.7
4
6
5
7
require (
6
- github.com/wechaty/go-wechaty v0.3.5
7
- golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
8
- golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
9
- golang.org/x/tools v0.1.8 // indirect
8
+ github.com/bitly/go-simplejson v0.5.0 // indirect
9
+ github.com/golang/protobuf v1.4.0 // indirect
10
+ github.com/google/uuid v1.1.1 // indirect
11
+ github.com/hashicorp/golang-lru v0.5.4 // indirect
12
+ github.com/kr/text v0.2.0 // indirect
13
+ github.com/lucsky/cuid v1.0.2 // indirect
14
+ github.com/maruel/rs v0.0.0-20150922171536-2c81c4312fe4 // indirect
15
+ github.com/otiai10/opengraph v1.1.1 // indirect
16
+ github.com/skip2/go-qrcode v0.0.0-20191027152451-9434209cb086 // indirect
17
+ github.com/tuotoo/qrcode v0.0.0-20190222102259-ac9c44189bf2 // indirect
18
+ github.com/wechaty/go-grpc v0.18.12 // indirect
19
+ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f // indirect
20
+ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
21
+ golang.org/x/text v0.3.7 // indirect
10
22
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
23
+ google.golang.org/genproto v0.0.0-20200416231807-8751e049a2a0 // indirect
24
+ google.golang.org/grpc v1.28.1 // indirect
25
+ google.golang.org/protobuf v1.21.0 // indirect
11
26
)
You can’t perform that action at this time.
0 commit comments