5 basic resources to help you get started with your Golang project

Google’s Go language or alternatively Golang is currently one of the fastest-growing programming languages in the software industry. Its speed, simplicity, and reliability make it the perfect choice for all kinds of developers. If you want to get started with a new project using Golang, the following resources will help you get off the ground in no time:

  1. The most commonly used project structure for a medium to large-sized project: https://github.com/golang-standards/project-layout
    A good baseline project to get you started: https://github.com/jasonrey/simple-go-server
  2. Install Go on your system, setting up environment variables, understand root/workspace directories: https://medium.com/rungo/working-in-go-workspace-3b0576e0534a
  3. Setup the configuration files and create the script for server startup: This resource loads the config files at the application start only once. It is also a good repository to help you set up route registrations and the server start-up: https://github.com/jasonrey/simple-go-server/blob/master/pkg/helpers/config.go
  4. Golang is a statically-typed language. Hence, you will need to create a struct type to hold requests, responses, and DTOs. Convert a JSON to Golang struct type using this tool: https://mholt.github.io/json-to-go/
  5. Extract the information from the HTTP request and put it in a struct type using JSON Unmarshal:

Software Engineer at AirAsia

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store