Skip to content

AlonzoRicardo/GOCRUDTLS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go_auth

go CRUD TLS server + SQLITE3 db

Helper Content

Production Ready Go Service in 30 Minutes
gopherconuk
Exposing Go to the Internet
Style guideline for Go packages
Creating and managing CA certs with mkcert
GO TLS server examples
ORM sqlite - code
sqlite3 in a docker image

cURL

Create a self-signed certificate and tell cURL where to look for it

mkcert localhost
curl --capath $(mkcert -CAROOT) https://localhost:8080/

Tips

  • As a rule of thumb, keep types closer to where they are used. This makes it easy for any maintainer (not just the original author) to find a type.

  • A common practise from other languages is to organize types together in a package called models or types. In Go, we organize code by their functional responsibilities.

  • Main packages are not importable, so exporting identifiers from main packages is unnecessary. Don't export identifiers from a main package if you are building the package to a binary.

  • Package names should be lowercase. Don't use snake_case or camelCase in package names. The Go blog has a comprehensive guide about naming packages with a good variety of examples.

  • In go, package names are not plural. This is surprising to programmers who came from other languages and are retaining an old habit of pluralizing names. Don't name a package httputils, but httputil!

  • Always document the package. Package documentation is a top-level comment immediately preceding the package clause.

About

Simple go CRUD TLS server with SQLITE3 instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published