Golang imports tutorial: how to import Golang local package | Golang tutorial

17489
132
501
08.10.2021
Red Eyed Coder Club

Red Eyed Coder Club

1041811
11500
141
30.01.2019
US
Описание видео:

This Golang Imports tutorial is about importing local packages in Golang. In this video we'll look at how to import a variable from one Go file to another within a single Golang local package, and how to import a variable declared in another Golang package. What is a Golang module path? What is a Golang package path? We'll look at 2 cases of Golang import local packages: 1. When we need to use a variable declared or defined in another Go file, but within the same directory (that is, within the same Go package) 2. When we need to use a variable that is declared in another Go package. The most misunderstanding about packages in Golang (and Golang importing issues) are that the Golang local package's path is not the path of a directory in a file system. These paths can match, but it's not necessary. Follow me 🤍: Telegram: 🤍t.me/red_eyed_coder_club Twitter: 🤍twitter.com/CoderEyed Facebook: 🤍fb.me/redeyedcoderclub Timecodes: 00:00 - start 00:34 - creating a new Golang project 00:50 - Golang module path 01:40 - Golang "Hello world" 02:12 - Case 1. How to import from a Go file in the same directory 03:13 - Golang local packages - all files in the same directory must have the same package name 03:42 - How to use a variable declared or defined in another Go file (within the same package) 04:40 - Case 2. Import variable from another Golang local package 06:42 - Golang package's path is a "virtual path", that might no match to a path of directory in your file system. * Golang Tutorials * Golang imports tutorial: how to import Golang local package 🤍youtu.be/Nv8J_Ruc280 Golang tutorial: How to scrape websites with Golang & Goquery 🤍youtu.be/4VIoT50mzzo Golang Tutorial: How to scrape Ebay with Golang and Goquery 🤍youtu.be/mS74M-rnc90 Golang Fyne: How to compile *apk for Android 🤍youtu.be/4S-AQlV1pcw ➥➥➥ SUBSCRIBE FOR MORE VIDEOS ➥➥➥ Red Eyed Coder Club is the best place to learn Python programming and Django: Subscribe ⇢ 🤍🤍youtube.com/channel/UCh_LSaTv2GeZ3woJNTGihew?sub_confirmation=1 Golang imports tutorial: how to import Golang package | Golang casts 🤍youtu.be/Nv8J_Ruc280 This Go programming tutorial is about go packages, about Golang import local package system (what are go packages and go modules) , is about how to import Golang variables, about golang modules and packages. #golang #redeyedcoderclub #goimports #importingingo #gopackages #golanglocalpackage #golangpackages

Кадры из видео
Golang imports tutorial: how to import Golang local package | Golang tutorial
Golang imports tutorial: how to import Golang local package | Golang tutorial
Golang imports tutorial: how to import Golang local package | Golang tutorial
Golang imports tutorial: how to import Golang local package | Golang tutorial
Тэги из видео
Комментарии пользователей:
jabuci
2022-09-19 16:44:05

Thank you very much! Through your video I understood how it works.

Orange Chinchilla
2022-09-19 10:01:38

Спасибо, иначе бы не разобрался. Всё четко и подробно объяснил

A H
2022-09-18 14:04:15

Finally! Someone actually explained this with simple language.

михаил киселёв
2022-09-17 08:25:40

спасибо

hossein
2022-09-15 12:16:18

thank you so much I was going crazy

Ajalan Brown
2022-09-11 01:33:35

very helpful video trying to build an api

stef25
2022-09-09 06:21:03

Great concious and clear explaination! Thank you!

DanielJ
2022-08-25 18:28:51

wow thank you so much, very clear and to the point

elv lol
2022-07-25 10:23:05

Thanks mate

Ukaigwe Chidi
2022-07-24 19:02:20

many thanks for sharing this, you saved the day ...

Bow Go
2022-07-19 15:11:22

thanks for calm explanation

xavstone
2022-07-01 13:39:26

Nice simple explanation. Many thanks.

João Hudson Lacerda Oliveira
2022-06-23 19:33:51

Nice! Thanks.

Rich
2022-06-19 13:55:54

Good job

PENG JINGMING
2022-06-16 09:21:47

Thank you so much! This is so far the only 1 video I could find that clearly explains the local import usage of golang module. As a new golang learner, it solves my puzzles and saves me from almost giving up~

Vincent Rouilhac
2022-06-07 20:35:34

...man i really don't know how to say thank you in a way that would really translate my feelings right now, having wasted the last hour searching many resource, and you made it sooo clear under 10 minutes, god bless you !

Muhammad Yasser
2022-06-03 18:20:21

Thanks a ton! I was confused and didn't get this topic. I also wonder, why do we run go code using "go run .", and how is it different from "go run main.go"?

allie
2022-06-03 16:57:27

this is a tad harder than C but easier than Python on terms of dependency management in my opinion. i'm more used to Java-style. Python package mgmt gives me nightmares. thanks for the tutorial, got me up to speed quickly.

Fabricio
2022-05-27 17:14:01

After struggling a lot, I finally was able to understand how imports work in Go thanks to this video, thank you! (new sub)

Что ищут прямо сейчас
ch341a CHINESE CUISINE 명작 big engine swap sefo sanki ben amk Daily Busking campioni del mondo grace cover coc mod server fiverr warzone hexagon finishing challenge NULLFPS Luxury homes wardrobe drew barrymore Fon ma3rouf cereals 好波
Похожие видео
21.11.2021
GoLang Packages and Modules | Beginners Go Tutorial

GoLang Packages and Modules | Beginners Go Tutorial

20.08.2021
Github Copilot MAKES A CLI GAME IN GOLANG FROM SCRATCH?!?!

Github Copilot MAKES A CLI GAME IN GOLANG FROM SCRATCH?!?!

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

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

28.01.2018
Learn Go in 12 Minutes

Learn Go in 12 Minutes

17.12.2021
Golang Package Structure Explained in 7 Minutes

Golang Package Structure Explained in 7 Minutes

04.03.2018
Concurrency in Go

Concurrency in Go

18.09.2018
Go / Golang Crash Course

Go / Golang Crash Course

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

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

15.12.2021
Golang Tutorial for Beginners | Full Go Course

Golang Tutorial for Beginners | Full Go Course

05.03.2021
Golang Packages & Scope Explained!

Golang Packages & Scope Explained!

18.10.2021
golang code splitting / local packages

golang code splitting / local packages

02.02.2022
Go Environment Variables Explained in 5 Minutes

Go Environment Variables Explained in 5 Minutes

18.03.2022
A Go programozás alapjai - Első alkalom | HWSW képzés!

A Go programozás alapjai - Első alkalom | HWSW képzés!

10.07.2020
Master Go Modules in under 13 minutes - Go / Golang Module Tutorial

Master Go Modules in under 13 minutes - Go / Golang Module Tutorial

18.05.2022
Intro to Python Mocks #2: Mocking Exceptions | Python tutorial

Intro to Python Mocks #2: Mocking Exceptions | Python tutorial

26.09.2021
Advanced Golang: Channels, Context and Interfaces Explained

Advanced Golang: Channels, Context and Interfaces Explained