notes

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Command notes is a small JSON API built with Anetos's HTTP layer: routing, named routes, typed handlers with binding and validation, and error responses. Notes are kept in memory.

APP_ENV=development HTTP_ADDR=:8080 go run ./examples/notes

curl -s localhost:8080/notes -H 'Content-Type: application/json' -d '{"title":"Hello","body":"First note","tags":["intro"]}'
curl -s localhost:8080/notes -H 'Content-Type: application/json' -d '{"title":"","tags":["a","a"]}'   # 422
curl -s localhost:8080/notes?limit=10
curl -s localhost:8080/notes/1
curl -s -X DELETE localhost:8080/notes/1

Jump to

Keyboard shortcuts

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