UPDATE
Starting from version 1.26 Serverless Framework includes two Golang templates:
aws-go - basic template with two functions
aws-go-dep - recommended template using dep package manager
You can use them with create command:
serverless create -t aws-go-dep
Original README below.
Serverless Template for Golang
This repository contains template for creating serverless services written in Golang.
Quick Start
- Create a new service based on this template
serverless create -u https://github.com/serverless/serverless-golang/ -p myservice
- Compile function
cd myservice
GOOS=linux go build -o bin/main
- Test Locally
sls invoke local -f hello -d '{ "Event": { "source": "serverless-plugin-warmup" } }'
sls invoke local -f hello --data '{"Username": "me", "Password":"securething"}'
- Deploy!
serverless deploy
What's in a name?
Golang has a rich history of naming HTTP and middleware type libraries on classy gin-based beverages (think Gin, Martini and Negroni). Vesper is yet another gin-based beverage.
Vesper was also inspired by Middy JS, who's mascot is a Moped.
Vesper is a (not so clever) portmanteau of Vesper, the gin-based martini, and Vespa, a beautiful Italian scooter.