• Stars
    star
    139
  • Rank 262,206 (Top 6 %)
  • Language
    Go
  • Created over 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Effortless Golang

Effortless Golang

I considered writing a book about Go, but decided not to.

Instead I've compiled a list of curated resources to make learning the language as effortless as possible. Hince the name "Effortless Go".

You can Follow me on Twitter @joshduffney.

Learn the Language Fundamentals

Web Development

Building CLIs


Table of Contents

This is the outline from the book proposal I never sent. But if I had to start over learning Go, this is how I'd go about it.

  1. Before you begin
    1. Who should read this book.
    2. Go as your first programming language.
    3. The Go Playground
  2. Built-in types
    1. Data structures
    2. Staticaly typed vs dynamic
    3. Primitive types
      • Numbers
      • Booleans
      • Bytes and Runes
    4. Composite types
      • Arrays
      • Slices
      • Strings
      • Maps
    5. Using fmt to determine the type.
    6. The Zero Value
  3. Variables, Constants, and Declarations
    1. Naming variables
    2. Defining muliple variables
    3. Using the short variable delcaration :=
    4. Variable scopes
      • blocks
    5. Constants
      • const vs var
    6. Type and untyped declarations
      • Explicit type conversion
  4. Control Structures
    1. What is a control structure?
    2. The if Statement.
      • Avoid else at all costs.
    3. The switch statements.
    4. The for Statement
      • Range
  5. Functions
    1. Declaring and calling functions
      • Named and optional parameters
    2. Variadic input parameters
    3. Return values.
    4. Ignoring returned values
    5. Anonymous functions
    6. Closures
  6. Pointers
    1. What are pointers?
    2. Understanding memory addresses and values
    3. Why are pointers important?
    4. Declaring, referencing, and dereferencing pointers.
    5. Avoiding nil pointers and null pointer dereferences.
  7. Goโ€™s Type System
    1. Structs
      • User defined types
      • Type embedding
      • Anonymous structs
      • Struct literals
    2. Methods
      • Receivers
      • Method sets.
    3. Interfaces
      • Polymorphism
  8. Leaving the playground
    1. Installing Go
    2. Go developer survey data results for Go dev environments.
    3. VS code setup
    4. Neovim setup
    5. Using the Go tools
      • Go run
      • Go build
  9. Packages, modules, and repositories
    1. Creating a package
      • Go mod
    2. Flat structure
    3. Within a directory
    4. Withing a pkg folder
    5. Imports and Exports
      • Capitals for exports
      • Local imports
    6. 3rd party imports
    7. Is thatโ€™s a package, whatโ€™s a module?
    8. Library \ dependency management
    9. Comment-based documentation
  10. The Standard Library
    1. Navigating pkg.go.dev
    2. Core packages
      • Reading data from files (io/ioutil,)
      • Create an http server.
      • Sorting with algorithms
  11. Create a RESTful web service
    1. Setting up the project structure
    2. Understanding the net/http package
    3. Creating a healthcheck endpoint
    4. Making a user-defined application type with methods
    5. Adding routes and handlers
  12. Build a command line app
    1. Adding a cmd app to the project repo
    2. Understanding the flags package
    3. Designing use cases
    4. The anatomy of a commandline app
    5. Implementing commands
    6. Adding flags
    7. Interacting with APIs
  13. Writing Tests in Go
    1. Identifying test cases
    2. The test package.
    3. What are the different types of tests?
    4. Writing unit tests to validate code.
    5. Testing your API
    6. Testing your CLI app

More Repositories

1

PowerShell

A PowerShell Repository for all the miscellaneous scripts I'm working on. Enjoy!
PowerShell
78
star
2

becomeansible

Start as a beginner, leave production ready. Begin with running ad-hoc Ansible commands and end deploying Ansible with GitHub Actions.
PowerShell
70
star
3

ImprovedActiveDirectory

PowerShell module with improved Active Directory cmdlets
PowerShell
30
star
4

WEF_ADSecuirtyLogs

Windows Event Forwarding for Active Directory Security Logs
PowerShell
28
star
5

terraform-in20hours

Learning Terraform in 20 Hours
HCL
28
star
6

secure-supply-chain-on-aks

Learn how to use open-source tools to secure your container deployments on Azure Kubernetes Service.
Shell
28
star
7

smart-notes

Physical slip-box converted into Obsidian
21
star
8

InvokeDSC

PowerShell module for Invoking DSC from json
PowerShell
15
star
9

reclaim

Take back your attention, Hit RESET on your digital life.
Dockerfile
15
star
10

go-building-web-services-applications

Source code for the Pluralsight course titled "Building Web Services and Applications with Go"
Go
6
star
11

manage-azure-with-ansible-20-mins

Presentation code samples for Manage Azure with Ansible in 20 minutes talk.
Shell
5
star
12

duffney.io

HTML
5
star
13

containers-from-scratch-cli

A simple Go CLI that builds Linux containers. Based on Liz Rice's https://github.com/lizrice/containers-from-scratch/tree/master
Go
4
star
14

chocolatey

Ansible role for installing Chocolatey
PowerShell
3
star
15

shorturl

A URL shortener service written in Go following the System Design Interview scenario
Go
3
star
16

reading-list

RESTful API written in Go for storing & retrieving your favorite books from a database.
Go
2
star
17

archive

Repository of repositories, storing all abandoned but useful code.
PowerShell
2
star
18

setup-notation

A GitHub Action for using the Notation CLI
JavaScript
2
star
19

useful-terraform-examples

HCL
2
star
20

dotfiles

How I did this
Lua
2
star
21

ansible-actions

Using Ansible with GitHub Actions
Dockerfile
1
star
22

notation-sign-action

A GitHub action for digitally signing container images with Notary.
1
star