go-bookstore

module
v0.0.0-...-dcbc598 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2022 License: Apache-2.0

README

Golang bookstore that uses MySQL

This example is taken from Learn Go Programming by Building 11 projects.

There's a similar example that uses SQLite from Pluralsight.

Overview

  • This introduces the gorm package
  • The project structure is Model-View-Controller for the most part, minus the View
  • The database part is very bare bones as I don't care much for that here, I just want to familiarize myself with golang ways of doing things

Notes

  • This project structure is less confusing than the other projects in the series
  • Seems like there are other dialects for the Gorm package, if MySQL is not your first choice
  • Golang has absolute paths. Note the paths of the controllers in particular
  • Imports are fun due to the absolute paths. At least goimports provides a standard
  • I left the exe files out of the repo
  • I didn't add the database username or password as this is just a sample project, and I don't want to share sensitive information in repos. There are some recommended best practices to clean configuration management in Golang

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL