Advertisement
Guest User

Untitled

a guest
Sep 7th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.37 KB | None | 0 0
  1. type BaseInterface interface {
  2.  
  3. }
  4.  
  5. type Base struct {
  6.     BaseInterface
  7. }
  8.  
  9. type Personal struct {
  10.     Base
  11.     Id        int  `db:"id"`
  12.     Name      int  `db:"name"`
  13.     IsWorking bool `db:"is_working"`
  14. }
  15.  
  16. func AnyFunc() (err error) {
  17.     var base BaseInterface
  18.     base = &Personal{}
  19.  
  20.     sm, err := dbe.Preparex(`SELECT id, name, is_working FROM "personal"`)
  21.     err = sm.Get(base)
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement