Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demo code executes fail #5

Open
Reese1995 opened this issue Nov 10, 2020 · 1 comment
Open

Demo code executes fail #5

Reese1995 opened this issue Nov 10, 2020 · 1 comment

Comments

@Reese1995
Copy link

Here is my output:

Before Login: zeal
@begin Around
@proceed Result is false
@EnD Around
After Login: zeal gogap
panic: reflect: wrong return count from function created by MakeFunc

goroutine 1 [running]:
reflect.callReflect(0xc000078b10, 0xc00010fed8, 0xc00010fec0)
C:/Go/src/reflect/value.go:567 +0x74d
reflect.makeFuncStub(0x8c1e22, 0x4, 0x8c2054, 0x5, 0xc000078b10, 0x0, 0x0, 0x1, 0xa, 0x8c3218, ...)
C:/Go/src/reflect/asm_amd64.s:20 +0x49
main.main()
C:/Users/xxxxxxxxx/go/src/awesomeProject2/aop.go:64 +0x3cd

@xujinzheng
Copy link
Member

Please parse your code here, example is correct

➜  example git:(master) pwd
/go/src/github.com/gogap/aop/example

➜  example git:(master) go get -v -u

➜  example git:(master) go run main.go
==========Func Type Assertion==========
Before Login: zeal
@Begin Around
@Login fakeName fakePassword
@Proceed Result is false
@End Around
After Login: zeal gogap
Login result: false
================Invoke=================
Before Login: zeal
@Begin Around
@Login fakeName fakePassword
@Proceed Result is false
@End Around
After Login: zeal errorpassword
Login result: false
1 bumd03i3k1kb1qtk2epg auth main.(Auth).Login Before
2 bumd03i3k1kb1qtk2epg auth main.(Auth).Login Around
3 bumd03i3k1kb1qtk2epg auth main.(Auth).Login *Login
4 bumd03i3k1kb1qtk2epg foo main.(Auth).Login Bar
5 bumd03i3k1kb1qtk2epg auth main.(Auth).Login After
6 bumd03i3k1kb1qtk2eq0 auth main.(Auth).Login Before
7 bumd03i3k1kb1qtk2eq0 auth main.(Auth).Login Around
8 bumd03i3k1kb1qtk2eq0 auth main.(Auth).Login *Login
9 bumd03i3k1kb1qtk2eq0 foo main.(Auth).Login Bar
10 bumd03i3k1kb1qtk2eq0 auth main.(Auth).Login After

➜  example git:(master) go version
go version go1.13.10 darwin/amd64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants