Learn Go Programming - Golang Tutorial for Beginners

freeCodeCamp.org · 2.7M views · 2019 · 6:39:58

Open on YouTube

C, C++, Rust, Go & systems languagesEducation & learningcourse

Why Stack Overflow recommends it

Stack Overflow users cite it as the Go tutorial they followed, mainly when asking about setup problems like GOPATH or concurrency patterns with goroutines and channels.

Recommended by 0 people across 0 different months, 2019 to 2022.

What it is

A 6.5-hour beginner course on the Go programming language, taught by Michael Van Sickle and hosted on freeCodeCamp. It covers environment setup, variables, primitives, collections, control flow, functions, interfaces, goroutines and channels.

What people said

Cites naz · 2019-11 · Stack Overflow · on “Multiple producers, single consumer: all goroutines are asleep - deadlock”

I have been following a pattern of checking if there is anything in the channel before proceeding with work: func consume(msg <-chan message) { for { if m, ok := <-msg; ok { fmt.Println("More messages:", m) } else { break } } } that is based on this video [this video] . Here is my full code: package main import ( "fmt" "strconv" "strings" "sync" ) type message struct { body string code int } var markets []string = []string{"BTC", "ETH", "LTC"} // produces messages into the chan func produce(n int, market string, msg chan<- message, wg *sync.WaitGroup) { // for i := 0; i < n; i++ { var msgToSend = message{ body: strings.Join([]string{"market: ", market, ", #", strconv.Itoa(1)}, ""), code: 1, } fmt

Cites SanQuinteros · 2021-02 · Stack Overflow · on “Issue on ~/.bashrc, written file PATH is not correct”

I am downloading Go on my Ubuntu 16.04 computer. I am following this tutorial and I can't progress from this part on youtube [this video] : When I created that Main.go an error on VSC console shows up: Failed to run '/usr/local/go/bin/go env' (cwd:/home/santiagoquinteros/code): Error: Command failed:/usr/local/go/bin/go env GOPATH GOROOT GOPROXY GOBIN GOMODCACHE missing $GOPATH If i write on the console for example this command, this shows up: ~$ go get github.com/nsf/gocode missing $GOPATH This is whats inside my ~/.bashrc: export GOROOT=/usr/local/go export PATH=$PATH:/usr/local/go/bin export GOPATH=/home/santiagoquinteros/golib export PATH=$PATH:$GOPATH/bin export GOPATH=$gopath:/home/santiago

Cites Nguyễn Đức Minh · 2022-03 · Stack Overflow · on “How to refer to a certain stdout line in Python?”

I'm trying to write a program that downloads a portion of a video using yt-dlp to get the stream link and ffmpeg to download the video. Here's what the program will do: Ask the user for the video link, then pass the link to original_link variable Ask the user for start time and end time, then pass those to start_time and end_time respectively. Using subprocess , call the shell command yt-dlp --get-url <original_link> . yt-dlp will output links line-by-line. If the stream is from Twitch, it is HLS and yt-dlp will return one link only (and the link will be used for both video and audio input). If the stream is from services such as Youtube, yt-dlp will return two links: one audio stream and on