sqlx

command
v0.0.0-...-5361bcd Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

README

Macaron + sqlx

This is an example of using Macaron and sqlx to achieve CRUD tasks for songs.

Install and run:

$ go get github.com/go-macaron/examples/sqlx
$ cd github.com/go-macaron/examples/sqlx
$ make
  • Create a song:

    curl --data "title=Shake It Off&artist=Taylor Swift&year=2014" http://localhost:4000/songs
    
  • Get all songs:

    curl http://localhost:4000/songs
    
  • Get a song:

    curl http://localhost:4000/songs/1
    
  • Edit a song:

    curl --request PATCH --data "title=Shake It Off2&artist=Taylor Swift&year=2014" http://localhost:4000/songs/1
    
  • Delete a song:

    curl --request DELETE http://localhost:4000/songs/1
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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