Golang Packages & Scope Explained!

12559
42
463
06.03.2021
Golang Dojo

Golang Dojo

981757
21500
111
09.02.2021
US
Описание видео:

Golang Packages & Scope Explained! - Today's Golang tutorial is all about Golang Packages and Scope. There are 3 levels of scope in Go - block, package, and universe. We will go through each of them and explain how they are applied in Go in today's Golang tutorial video. Enjoy! Golang Dojo is all about becoming Golang Ninjas together. You can expect all kinds of Golang tutorials, news, tips & tricks, and my daily struggles as a Golang developer. Make sure to subscribe if you look forward to such content! Get Your Golang Cheat Sheet! - 🤍golangdojo.com/cheatsheet Git repos & notes - 🤍golangdojo.com/resources Learn Golang in X Minutes Playlist - 🤍youtube.com/playlist?list=PLve39GJ2D71xX0Ham0WoPaYfl8oTzZfN6 Timestamps - 0:00 Intro 0:57 Scope 1:57 Block 4:09 Package 7:45 Universe 10:02 Small Recap 11:53 Import Path 13:24 Outro #golang #goprogramming #golangdojo

Кадры из видео
Golang Packages & Scope Explained!
Golang Packages & Scope Explained!
Golang Packages & Scope Explained!
Golang Packages & Scope Explained!
Тэги из видео
Комментарии пользователей:
Mohammad Saeidi
2022-07-20 14:49:37

hi thank you for your efforts. why didnt you use VScode? because you used that in the first place, i do have some problems in VScode now ,for example: when i declare a variable in a file i cant use it in another file even though both of the files exist in a same directory .

Rich
2022-06-14 12:00:39

Is each scope its own like (frame?) in memory

Chris Snook
2022-05-20 15:03:55

Just want to say I love your videos. I appreciate the way you cover the Golang

Serak Shiferaw
2022-04-17 06:06:44

thank you how do i call a function from the same package / different file and from different package?

Ioannis Ellin
2022-04-05 03:25:48

Amazing guide, I wish everyone could explain like this! 🙏🙏

Luis Mediavilla
2022-02-13 11:19:31

I have also have some doubts about relative paths Iif the imported package is going to live in another directory not internet. Do other packages need go mod init?

Luis Mediavilla
2022-02-13 11:18:17

What would you do I here go mod init demo?

KratosTheInevitable
2022-01-23 22:02:33

thanks sir. You explained this so well.

Saravanan Saibaba
2022-01-17 19:35:40

Fantastic content.Really like the pace at which you explain the concepts. It’s like reading the book

Rafael Diaz Miles
2021-12-19 18:17:55

None of this happens when I try. I cant export no package at all even trying every root trying or go mod init or go get...

Ashish Khare
2021-11-27 14:14:40

Please use dark themes. My eyes are drowning in my own tears.

Sim Salabim
2021-11-20 09:51:13

unfortunately variables from other files are not available for me in main.go. I have package main in both declared on top
Update:
I solved it by moving main.go into a separate folder "main" inside root. So in Root I have folders main, packagefolder and go.mod file. The package folder is just any package, with packagefolder.go inside (call the folder and file whatever you like)

If I move main back to root, the app stops working. It took me probably 10 hours to figure this one out (a post in stackoverflow helped me). I tried everything, different editors (Goland VSCode), I tried a different computer, they all didn't work until I moved main.go into its own folder.

Isaac Cantun
2021-11-17 04:44:49

Your work is great, your videos are very useful, your channel is a hidden gem hahaha thank you, keep on uploading more videos please

Sabyasachi sahoo
2021-09-29 16:23:25

it did same things in package case,,but that every time i get underfined error..........-->both the file are in same floder,,,not any subfloder.......

Yaswanth Gadde
2021-08-19 10:20:20

bro you are doing great work, keep it up!!!

Mg Myo
2021-08-01 06:05:53

.i have these error \main.go:15:14: undefined: three

Zhaoshan Duan
2021-06-21 23:42:46

I discover your channel when I decided to pick up Go after Java. I think you are doing a fantastic job and definitely deserve more subs !

ThatGuyJamal
2021-05-10 20:34:56

thanks this helped a lot!

Fahimul Islam
2021-04-15 02:40:43

Hey buddy!!! Please make a video about go modules, go mod & go sum......

Что ищут прямо сейчас
ma3rouf cereals 好波 walking in china rap francais ecología ЧТО Yamaha Grenade lyric video kaidan Саунд дизайн: Теория и Практика makka madina shivling عظة yuenlong learning quran Roof wsl 2 powershell Recommended NAS Drive Refeições ISRAEL E RODOLFFO
Похожие видео
19.03.2021
Golang String, Golang StringBuilder, Strings Library

Golang String, Golang StringBuilder, Strings Library

13.04.2020
EVERYTHING You SHOULD know about Go Modules (Go Basics #8)

EVERYTHING You SHOULD know about Go Modules (Go Basics #8)

06.04.2021
Golang Loops - for loop, while loop, foreach loop, label

Golang Loops - for loop, while loop, foreach loop, label

21.11.2021
GoLang Packages and Modules | Beginners Go Tutorial

GoLang Packages and Modules | Beginners Go Tutorial

30.12.2020
Golang Tutorial 3 - Golang pointers explained, once and for all

Golang Tutorial 3 - Golang pointers explained, once and for all

06.04.2021
Golang Rune - Fully Understanding Runes in Go

Golang Rune - Fully Understanding Runes in Go

18.09.2018
Go / Golang Crash Course

Go / Golang Crash Course

22.06.2021
Golang Linked List - Golang Data Structures

Golang Linked List - Golang Data Structures

17.12.2021
Golang Package Structure Explained in 7 Minutes

Golang Package Structure Explained in 7 Minutes

17.07.2022
What Golang Projects Should I Build to Get a Job?

What Golang Projects Should I Build to Get a Job?

06.10.2021
What companies are using Golang? And how?

What companies are using Golang? And how?

26.07.2021
golang project structure

golang project structure

19.04.2022
make() vs new() - Similarities & Differences

make() vs new() - Similarities & Differences

19.04.2021
Golang Slices -

Golang Slices - "ArrayList" in Go

23.10.2019
Packages in Go (Go Basics #6)

Packages in Go (Go Basics #6)