-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathparse_func_test.go
47 lines (34 loc) · 928 Bytes
/
parse_func_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package main
import (
"log"
"testing"
)
// TestParseFunc ...
func TestParseFunc(t *testing.T) {
text := `package controller
import (
"context"
)
func NewResendMsg(ctx context.Context, uuid string, timestamp int64, data interface{}) *ResenderMsg {
}
func newResendMsg(ctx context.Context, uuid string, timestamp int64, data interface{}) *ResenderMsg {
}
type ResenderMsg struct {
}
func (r *ResenderMsg) isSendCtx() context.Context {
}
func (r *ResenderMsg) IsSendCancel() {
}
func NewCommonPBFilter[T proto.Message](ttype string,
vals []string, getters map[string]func(T) any) (*CommonPBFilter[T], error) {
}
func (c *CommonPBFilter[TPB]) DoFilter(data interfaces.BusinessData) (interfaces.BusinessData, error) {
}
func TestCLBResolver_Build(t *testing.T) {
}
`
willComments := ParseFunc(text)
for _, item := range willComments {
log.Printf("line:%v, funcName:=%v\n", item.OriginLineNo, item.Name)
}
}