General Notes while Taking the Course Learning Go for Web Development

Course by Larry Price on


  1. Install Go on Fedora
sudo dnf install golang
  1. Configure go path
mkdir -p $HOME/go
echo 'export GOPATH=$HOME/go' >> $HOME/.bashrc
source $HOME/.bashrc
  1. Check that GOPATH is set right
go env GOPATH
- this should yield /home/user/go
  1. Make project folder
cd go
mkdir project-name
cd projcet-name
  1. Create main package
vim main.go
package main

func () {
    fmt.Println("Hello, world")
  1. Make directory "templates" and put in file named index.html
  2. Make sqlite3 dev database
sqlite3 dev.db
  1. The Go sql package relies on us selecting a driver
go get
  1. Determine sqlite3 schema
  1. Create a table in sqlite3
sqlite3 dev.db
create table books(
pk integer primary key autoincrement,
title text,
author text,
id text,
classification text
  1. Get Negroni Middleware
go get
  1. Download Ace templating
go get
  1. Using gorilla/mux
    Gorilla mux is a third party router
go get
  1. Using go-gorp
    Gorp is a humble packet that provides a layer of abstraction between our code and the standard sql library
go get
  1. Session management with Negroni
    Negroni-sessions is simple and gives us easy session encryption
go get
  1. Use bcrypt for Password Encryption
go get

Popular Go Web Framworks

  1. Popular Go mini framework
go get
  1. More feature rich framework
go get
  1. Complex framework
go get OR
go get

Managing Code Quality

  1. go fmt
  2. golint
  3. unit test
General Notes while Taking the Course Learning Go for Web Development
Share this