Skip to content

Instantly share code, notes, and snippets.

View jeremyjohn's full-sized avatar
🦕

Jeremy John jeremyjohn

🦕
View GitHub Profile
@jeremyjohn
jeremyjohn / go_pg_array_in_array.go
Last active August 7, 2020 09:18
go-pg select where array in array example
type Example struct {
Tags []string `json:"tags" pg:",array"`
}
func (manager *Manager) Handler(w http.ResponseWriter, r *http.Request) {
ex := []*models.Example{}
src := []string{"tag_1", "tag_3"}
err := manager.app.DB.Model(&ex).
Column("*").