Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db, err := gorm.Open("postgres", "host=" + os.Getenv("HOST") + " port=5432 user=" + os.Getenv("USER") + " dbname=hosts password=" + os.Getenv("PASSWORD"))
- db.Exec("SELECT * FROM information_schema.columns WHERE table_schema = 'public' AND table_name = 'hosts'")
- defer db.Close()
Add Comment
Please, Sign In to add comment