Startup: go run cmd/web/*.go
This is the repository for my bookings & reservations project.
- Built in Go version 1.17
- Uses chi router
- Uses edwards
- Uses nosurf
./run.sh
run.bat
go test -v
go test -cover
go test -coverprofile=coverage.out && go tool cover -html=coverage.out
/bin/bash -c 'go test -covermode=count -coverprofile=rdm_test_coverage.cov $(go list ./... | grep -v /vendor/)'
run go tests in specific folders that have go files & generate rdm_test_coverage.cov results html format
/bin/bash -c 'go test -covermode=count -coverprofile=rdm_test_coverage.cov $(go list ./... | grep -v /vendor/) && go tool cover -html=rdm_test_coverage.cov'
CREATE DATABASE bookings
CREATE TABLE reservations (id MEDIUMINT NOT NULL AUTO_INCREMENT,room_id int,people_id int, start_date DATE, end_date DATE, PRIMARY KEY (id));
CREATE TABLE rooms (id MEDIUMINT NOT NULL AUTO_INCREMENT,name varchar(255),description varchar(255), PRIMARY KEY (id));
CREATE TABLE people (id MEDIUMINT NOT NULL AUTO_INCREMENT,last_name varchar(255),first_name varchar(255),email varchar(255),phone varchar(255), PRIMARY KEY (id));