Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Golang: Learn Go Programming Language and Go Recipes
Rating: 4.2 out of 5(52 ratings)
1,817 students

Golang: Learn Go Programming Language and Go Recipes

2 Course in 1. Learn the Fundamentals of The Go Programming Language & Go Recipes.
Created byMiyuki Takao
Last updated 7/2024
English
English [Auto],

What you'll learn

  • Learn the fundamentals of Go and syntax.
  • Go Recipes
  • Learn Go functions, types, conditionals, and loops.
  • Understand Object-oriented programming with Go.
  • Learn Concurrent programming with channels.
  • Learn about connectivity features for networking with APIs and databases.

Course content

8 sections64 lectures2h 32m total length
  • Go Time1:12

    Learn the Go programming language from Google, covering the basics, modern features, clean syntax, and a robust, well-documented common library for building reliable software.

  • Welcome1:03

    Learn Go programming language to build modern applications with concurrency and connectivity, as used in Docker and Kubernetes; follow along, write code, and get up and running as a beginner.

  • Setup1:10

    Set up your Go development environment by installing the Go SDK from go.dev, installing Git, and selecting an IDE such as Visual Studio Code with the Go extension or Goland.

  • Go Anatomy and Go tool3:37

    Discover the Go program structure from package main and imports to the main function and fmt.Println output, and learn go run, go build, and go tool workflows.

  • Numbers and assignments3:52

    Calculate the mean of two integers in go and print values and types. Explore integer and float types, type inference with :=, and the strict go type system.

  • Conditionals2:35

    Explore conditionals with if and switch, including initialization in if and the use of logical operators. See naked switch, default cases, and practical examples of range checks and out-of-range alerts.

  • For loops2:05

    Explore Go's for loops in various forms, including traditional, while-style, and infinite loops. Learn using break and continue to control flow, with examples that print sequences and demonstrate inner increments.

  • FizzBuzz0:52

    Solve the fizzbuzz problem by printing numbers 1 to 21, replacing multiples of three with fizz, multiples of five with buzz, and both with fizzbuzz using modulo.

  • Solution: FizzBuzz0:50

    Implement a Go program that uses a main loop from 1 to 20 to print fizz, buzz, or fizzbuzz based on divisibility by 3 and 5, or the number.

  • Strings2:59

    Learn string basics in Go: declare and print strings, measure length with len, slice and concatenate, and use lowercase and raw backtick strings for Unicode and multi-line text.

  • Assignment: Even-ended numbers0:50

    Determine and count even-ended numbers, where the first and last digits match, that are products of two four-digit numbers; demonstrate number-to-string conversion with sprintf and %q in Go.

  • Solution: Even-ended numbers0:48

    Iterate pairs of four-digit numbers in Go, prevent duplicate counting, compute their product, convert it to a string, check if first and last letters match, and print the count.

  • Slices2:34

    Explore slices in Go by printing and indexing a string slice, using len, formatting with %v and %T, iterating with for and range, accessing index and value, and appending elements.

  • Maps2:37

    Explore how maps work in Go by mapping string keys to float64 values in a stock portfolio, including creation, retrieval, existence checks, updates, deletion, and iteration.

  • Assignment: Maps0:21

    Count word frequencies by splitting text into words, converting them to lowercase with strings.ToLower, and printing the resulting map as part of a Go programming assignment.

  • Solution: Maps0:51

    This lecture demonstrates counting word frequencies in Go by converting text to words, lowercasing, updating a map with counts, and printing the results.

  • Functions1:41

    Explore Go functions as building blocks for modular and reusable code, defining functions with the func keyword, parameters, and return values, including returning multiple values like quotient and remainder.

  • Parameter passing2:02

    Compare Go parameter passing: values are copied, but slices act like pointers, enabling in-place modification. Use pointers (with ampersand) to update data, and optional unsafe tricks from C++.

  • Error return and Defer3:44

    Go functions can return multiple values, enabling error handling with a zero value on error and fmt-created errors; defer ensures resources release in reverse order.

  • Object-Oriented: structs & methods4:41

    Define a budget struct to group fields like balance and expiration time, then access fields with dot notation and implement methods with value and pointer receivers.

  • Creating structs with New function1:56

    Learn how to create structs in Go with a New function that returns a pointer and an error, validating campaign ID, balance, and expiration, and understand Go's escape analysis.

  • Interfaces & Generics3:33

    Explore how the shape interface defines an area method, implemented by square and circle, to sum areas; see generics with ordered types to implement a min function.

  • Error handling5:26

    Learn idiomatic Go error handling: treat errors as values, wrap with context to enable stack traces, and use defer and recover to guard resource reads, logging setup, and panics.

  • Concurrency: Goroutines2:41

    Explore how goroutines enable lightweight concurrency in Go by running parallel URL fetches, synchronized with a wait group, and observe a dramatic speedup from serial to concurrent execution.

  • Channels4:08

    Channels in Go are typed one-directional pipes for goroutine communication; they block on send or receive, can be closed for range loops, and buffered channels allow non-blocking sends.

  • Select and Context4:36

    Explore Go's select for multiple channels and timeouts, and the context package for deadlines and cancellations, with a real-time bidding example and a default bid on timeout.

  • Project managment10:27

    Manage go dependencies with go modules and go.mod, and explore testing, table-driven and subtests, plus benchmarking and profiling with built-in tools and graphviz for visualization.

  • JSON & HTTP calls5:07

    Learn how to serialize and deserialize JSON in Go using the encoding/json package, decode from a reader, encode responses, and make HTTP GET and POST requests with JSON using net/http.

  • Timeouts & Size Limit1:55

    Learn how to guard external calls in Go by using context with a timeout and io.LimitReader to cap response size, demonstrated with net/http and a sample request.

  • HTTP server3:12

    Learn to build a production-ready http server with net/http, define health and math handlers, decode json requests, perform operations, encode results, and route endpoints using a simple Go server.

Requirements

  • Basic understanding of programming

Description

Welcome to this two part course on learning Go, the programming language from Google. In this 2 part course we'll go over the fundamentals of Go and then get into Go Recipes.

We'll start things off with the fundamentals of Go. We'll cover most of the language and learn many of the concepts that underlie this programming language.

In course two, we get into more advance topics. You'll be introduced to Golang Recipes. Which shows examples of how the Go programming language can be used

We'll walk you through common Go projects with "recipes," or step-by-step instructions. We'll go over some basics, such as Go slices, maps, error handling, and panic recovery.

We'll then get into how to measure, format, parse, and convert time in Go. We'll go over ways you can work with text in Go. Then demonstrate using structs, methods, and interfaces to improve your code.

We'll discuss working with JSON and HTTP, then concludes by describing the benefits of bringing concurrent instructions to your apps.

Go – also known as Golang – is an open source programming language developed by Google in 2007.  Go makes it easy to build simple, reliable, and efficient software.

Go is a programming language with modern features, clean syntax and a robust well-documented common library, making it an ideal programming language to learn. Go can be used for anything, meaning developers who learn Go can use it wherever they want.

Quite a few large companies are starting to make the switch over to Go and there are many that already use it for parts of their backend software. Some companies that use Go are: Facebook, Google, Github, 99designs and many more.

This is a great course to jumpstart your learning journey with Go, whether you want to learn it for personal or professional reasons.  This course touches on all of the basics so that you will have good understanding of the Go programming language.

Who this course is for:

  • Programmers
  • Developers
  • Anyone interested in learning the Go Programming Language