Route finder app — 100 days of golang day 10–20

Team and idea

Stack and tech

Learning golang

  • Code can be split into multiple files by specifying package main
  • This way all definitions will live in the same namespace and therefore no import is needed, functions and types can be used across files
  • To run the code we either have to do go run *.go or build and run executable
  • With split code there should be only one main function
  • Otherwise, if we want to have separate packages, we can set them up by having sub folders and specify a different package name
  • Packages can have their own main function
  • Packages need to be imported
  • Imported packages reside at the GOROOT or at a subfolder of the GOPATH
  • I learnt how to marshal and unmarshal between JSON and struct
  • Allowed CORS
  • Created a POST endpoint for the coordinates of start and endpoint

Learning GeoJSON

The App

What more to learn

  • Breadth-first search
  • Binary tree search
  • A* search
  • Dependency management
  • Environment configs

Oh, and btw we won!

Next steps

Github

--

--

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