gorm_crud_example

GoLang, GORM & Gin CRUD Example

Stars
77
Committers
1

Go, GORM & Gin CRUD Example

Install

  1. Clone this repository to $GOPATH/src/github.com/herusdianto directory:

     git clone https://github.com/herusdianto/gorm_crud_example.git
    
  2. Install glide:

     https://glide.sh/
    
  3. CD to gorm_crud_example folder:

     cd $GOPATH/src/github.com/herusdianto/gorm_crud_example
    
  4. Install dependencies using glide:

     glide install
    
  5. Open main.go and modify this variable values:

     dbUser, dbPassword, dbName := "root", "root", "gorm_crud_example"
    
  6. Login to MySQL and create the database:

     create database gorm_crud_example;
    
  7. Run main.go:

     go run main.go
    

Features

  • Database Migration
  • Create Data
  • Read All Data
  • Find One Data By ID
  • Update Data
  • Delete One Data By ID
  • Delete Multiple Data By IDs
  • Sort & Paginate Data
  • Search Data

If you want to watch step by step I'm making this, you can watch this videos.

Support me with subscribe to my channel on youtube, thank you.