Skip to content

Instantly share code, notes, and snippets.

@aquaflamingo
aquaflamingo / main.go
Created October 25, 2020 17:26 — forked from alyssaq/main.go
GET and POST golang API
/*
* Sample API with GET and POST endpoint.
* POST data is converted to string and saved in internal memory.
* GET endpoint returns all strings in an array.
*/
package main
import (
"encoding/json"
"flag"