11// @@
22// @ Author : Eacher
33// @ Date : 2023-09-06 13:56:59
4- // @ LastEditTime : 2023-09-20 16:45:39
4+ // @ LastEditTime : 2024-01-09 16:29:37
55// @ LastEditors : Eacher
66// @ --------------------------------------------------------------------------------<
7- // @ Description :
7+ // @ Description :
88// @ --------------------------------------------------------------------------------<
99// @ FilePath : /20yyq/can-debugger/flag/can.go
1010// @@
@@ -14,13 +14,13 @@ import (
1414 "flag"
1515 "fmt"
1616 "os"
17- "syscall"
1817 "os/signal"
18+ "syscall"
1919
20- "github.com/20yyq/can/sockcan "
21- "github.com/20yyq/can/read"
22- "github.com/20yyq/can/write "
23- "github.com/20yyq/can/iface "
20+ "github.com/20yyq/can-debugger/iface "
21+ "github.com/20yyq/can-debugger /read"
22+ "github.com/20yyq/can-debugger/sockcan "
23+ "github.com/20yyq/can-debugger/write "
2424)
2525
2626type FlagSetFunc func (* flag.FlagSet )
@@ -55,7 +55,7 @@ const helpOutput = `
5555
5656var (
5757 canInterfaceName string
58- canDebuggerName string
58+ canDebuggerName string
5959)
6060
6161var (
@@ -72,10 +72,10 @@ func init() {
7272 os .Exit (1 )
7373 }
7474 canInterfaceName , canDebuggerName = os .Args [1 ], os .Args [2 ]
75- runMap = map [string ]func () error {
76- "read" : readRuning ,
77- "write" : writeRuning ,
78- "iface" : ifaceRuning ,
75+ runMap = map [string ]func () error {
76+ "read" : readRuning ,
77+ "write" : writeRuning ,
78+ "iface" : ifaceRuning ,
7979 }
8080}
8181
@@ -138,7 +138,7 @@ func sockcanRuning(f func(*sockcan.Can)) error {
138138func listening (notify chan struct {}, stop <- chan struct {}) {
139139 quit := make (chan os.Signal )
140140 signal .Notify (quit , syscall .SIGINT , syscall .SIGQUIT , syscall .SIGTERM , syscall .SIGTSTP )
141- select {
141+ select {
142142 case <- stop :
143143 case <- quit :
144144 }
0 commit comments