Skip to content

A simple way to use migrations and postgres with go

License

Notifications You must be signed in to change notification settings

johnazedo/gopostgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gopostgres

A simple way to use migrations and postgres with go.

Usage

Create this fields in your .env file:

POSTGRES_USER=your_user
POSTGRES_PASSWORD=your_password
POSTGRES_DB=your_database_name
POSTGRES_HOST=your_host
POSTGRES_PORT=your_port

After that call the GetDatabase function in your main function:

import "github.com/johnazedo/gopostgres"

func main() {
    db, err := gopostgres.GetDatabase()
    if err != nil {
        panic(err)
    }
}

About

A simple way to use migrations and postgres with go

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages