basic sample how to create rest-api with golang
Go Shell Makefile
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
common
config
controllers
log
models
repositories
services
tests
.gitignore
LICENSE
Makefile
README.md
create_symlink_libs.sh
glide.lock
glide.yaml
main.go

README.md

###sample-go-api

    cd $GOPATH
    
    mkdir -p src/app && cd src/app
    
    git clone git@github.com:andboson/sample-go-api.git .
    
    glide install
    
    go test -v $(glide novendor)
    
    go build -v    

####glide

Glide is golang package manager. It is very similar to Composer (PHP package manager).

You must have Glide. See github glide for howto

Some packages:

Sample docs:

model.find_by_name

Return model api-response

Params:

- `name`  Name of model.

####sample request:

request:

{
	"name": "test-name"
}

response:

{
    "id": 3,
    "article": 1007455,
    "name": "test-name",   			
    "date": "2016-05-22"
}