Skip to content
This repository was archived by the owner on Oct 30, 2024. It is now read-only.

thimc/go-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST API using Go

  • main.go sets up the handlers and listening on the TCP network address.
  • handlers.go contains all the CRUD (create, read, update and delete) HTTP handlers.
  • utils.go contains a wrapper function that sets the response headers and HTTP code. It also marshals the response struct as a JSON and writes it to the body.

The "database" is initialized in the main.go file and the data is not persistent.

Note

This API was created for educational purposes only and should only be treated as such, it is not production ready.

About

a demo REST API written in go using native packages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages