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

panic in conditions when slice is empty for IN condition #8

Closed
samonzeweb opened this issue Jan 18, 2018 · 0 comments
Closed

panic in conditions when slice is empty for IN condition #8

samonzeweb opened this issue Jan 18, 2018 · 0 comments
Assignees

Comments

@samonzeweb
Copy link
Owner

Code :

err := conn.Select(&descriptions).Where("noeud_id in (?)", idsNoeuds).Do()

Cause : idsNoeuds is an empty slice.

Error :

panic: strings: negative Repeat count

goroutine 1 [running]:
strings.Repeat(0x6162ae, 0x2, 0xffffffffffffffff, 0x0, 0x97)
C:/Go/src/strings/strings.go:587 +0x1ce
github.com/samonzeweb/godb.Q(0x618897, 0xf, 0xc042077cd8, 0x1, 0x1, 0x1)
C:/Samuel/Provisoire/ParcoursGED.NET/Golang/src/github.com/samonzeweb/godb/condition.go:45 +0x654
github.com/samonzeweb/godb.(*StructSelect).Where(0xc042100240, 0x618897, 0xf, 0xc042077cd8, 0x1, 0x1, 0x410aff)
C:/Samuel/Provisoire/ParcoursGED.NET/Golang/src/github.com/samonzeweb/godb/struct_select.go:37 +0x8a

@samonzeweb samonzeweb self-assigned this Jan 20, 2018
samonzeweb added a commit that referenced this issue Jan 20, 2018
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

1 participant