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

execute example in at/basic, get an error #39

Open
576470954 opened this issue Sep 8, 2023 · 2 comments
Open

execute example in at/basic, get an error #39

576470954 opened this issue Sep 8, 2023 · 2 comments

Comments

@576470954
Copy link
Contributor

What happened: go run main.go , at at/basic, get error:
at/basic/main.go:38:2: undefined: sampleInsert
at/basic/main.go:41:2: undefined: sampleInsertOnUpdate
at/basic/main.go:44:2: undefined: sampleSelectForUpdate

What you expected to happen:
running normally

How to reproduce it (as minimally and precisely as possible):
may be in my golang version: go version go1.20.5 darwin/amd64

Anything else we need to know?: no

@576470954
Copy link
Contributor Author

i use: go run at/basic/* can pass this problem, but i dont know how to debug it by dlv in vscode
Another way to fix it is :go build at/basic/main.go, then execute it。

@wooyang2018
Copy link

It is preferable to execute go run ./at/basic/. here because go run at/basic/* may have side effects, such as causing an error when there are *_test.go files present in the directory.
Additionally, due to the location of conf/seatago.yml, the go run ./at/basic/. command should be executed in the main directory instead of following the instructions in the README to execute it in at/basic.

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