go__web_demo

package module
v0.0.0-...-3e63dce Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2022 License: BSD-3-Clause Imports: 0 Imported by: 0

README

go__web_demo

Contents

This is a customized version of the official go.dev web-service-gin tutorial.

It also includes a version using gorilla/mux for comparison.

License

This is a derivative work of the go.dev Gin example licensed under the go.dev BSD license

Like the upstream material, this is licensed under a BSD license.

Documentation

Index

Constants

View Source
const (
	RouteAlbums      = "/albums"
	RouteSingleAlbum = "/album/{id}"
)

Variables

View Source
var Albums = []Album{
	{ID: "1", Title: "Blue Train", Artist: "John Coltrane", Price: 56.99},
	{ID: "2", Title: "Jeru", Artist: "Gerry Mulligan", Price: 17.99},
	{ID: "3", Title: "Sarah Vaughan and Clifford Brown", Artist: "Sarah Vaughan", Price: 39.99},
}

Functions

This section is empty.

Types

type Album

type Album struct {
	ID     string  `json:"id"`
	Title  string  `json:"title"`
	Artist string  `json:"artist"`
	Price  float64 `json:"price"`
}

Album represents data about a record Album.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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