Skip to content

Instantly share code, notes, and snippets.

@mangalaman93
mangalaman93 / gorm_example.go
Created April 25, 2020 10:59
Use gorm with schema in postgres database
package main
import (
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/postgres"
)
type User struct {
ID int
Username string