Structs – Go Lang Practical Programming Tutorial p.6

In the programming language of Go, there are no Classes. Instead, we can create custom types called Structs, which we then associated methods with.

Text tutorials and sample code:


Koodauskanava says:

It’s so ugly when you use Python like syntax. You should avoid using underscores in Go.

sdb it says:

why this language obsessed about where curly brace should be placed?..

Kulakov Alexander says:

0 dislikes)

Zuokang Qu says:

is the main func necessary?

wuda says:

Nice… the language is similar to Delphi. I actually like the languge. The fact that it is compilable is very neat.

John Dowling says:

All your attributes of your struct would be private. Golang uses the case of the first letter of your attribute to tell the compiler if the attribute is public(upper) or private(lower). You should mention this as it can be quite frustrating to figure out why you cant see any of your struct attributes .

Toxic Desire says:

Well, it looks like a hybrid of c and java (with zero semicolons). Anyways, can anybody explain why would we need this language?

Edgar Vega says:

Great short videos!! keep doing Golang! thx

Nands says:

Is there something similar to unions in go?

rojimark says:

Does he mention Python in all the videos in this series?

Eric Falch says:

Hi, I get ” main redeclared in this block previous declaration at .1.go:23:6″.

However I’ve created another file (2.go) to do the example on this video, so I’ve only got 1 main func in my 2.go file.

How come my IDE (VS code) lists it as an error?

Anyway, a great thanks for this tutorial series! Keep’em coming.

 Write a comment


Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!