Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Go for .NET Developers

Go for .NET Developers

These are the presentation slides I created for the talk I gave at the Adelaide .NET User Group on 8th December 2021.


Sahan Serasinghe

December 09, 2021

More Decks by Sahan Serasinghe

Other Decks in Technology


  1. AGENDA 01 The What & Why 02 Tooling 03 Basic

    language constructs 04 Unit testing 05 Building a HTTP Web Service 06 Multi-Arch Deployments Resources
  2. DISCLAIMER This is not to say that one language is

    superior to another These are just tools and not solutions I’m not a “Go” expert
  3. GO Developed by Google in 2009 Released to the public

    in 2011 Strongly typed, compiled, garbage collected language Current version is 1.17 and 1.18 will be released in early 2022

    of execution speed of compilation dependency management to concurrency and optimization
  5. GOOGLE’S DESIGN GOALS FOR GO Create a compiler that works

    on large codebases as fast as possible Create a compiler that generates fast code using a good set of optimizations
  6. GO’S PHILOSOPHY Keep it simple • Keywords C# ~100 vs

    Go – 25 Consistency • gofmt – Tabs vs Spaces Opinionated • Unused vars are a compiler errors
  7. GO & C# - AT A GLANCE No classes =

    No inheritance No try/catch No generics (yet) No LINQ No Semicolons to end lines
  8. OTHER COOL BITS… •No need to manage runtimes on the

    deployment environment •Popular projects in the cloud native world
  9. GO TOOLING Go SDK Go CLI • go run •

    go build • go get • go vet • gofmt IDEs • VS Code, GoLand, VIM
  10. BASIC CONSTRUCTS • Variables • Packages/imports/modules • Slices & Loops

    • Conditionals • Functions • Structs • Pointers
  11. PROJECT STRUCTURE /cmd – Entrypoint(s) of the application /internal –

    Private application & library code /pkg – Library code visible to others /vendor – Application dependencies ⚠ if you are starting out, this is probably an overkill https://github.com/golang-standards/project-layout