Structs in golang

  Рет қаралды 42,730

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер: 26
@abdulrehman8775
@abdulrehman8775 3 жыл бұрын
Wow i am number one to like your post.. Keep up the good work
@danielvega646
@danielvega646 6 ай бұрын
This is like the step that Javascript wanted to do but well done: javascript tried to replace the classical paradigm of languages being based on prototypes, which provides to the language a lot of freedom being outside the 4 pillars of OOP and when you do classes on JS all is syntactic sugar for closured functions, but still its root is linked to classes since prototypes are just clones of already existent instances of classes, they just don't provide access to those classes to the developers, that's all. Golang, in change, have a real new propose: NO CLASSES. NO PROTOTYPES. JUST TYPES. The thing that is naturally part of any programming language: types! and Go just goes and augment their utilities. structs are nothing but syntactic sugar for closured functions types, and you don't even have to limit or relate your code to the OOP paradigm since there's not even inheritance, this is brilliant!
@rikunjsindhwad7597
@rikunjsindhwad7597 3 жыл бұрын
possible for you to brief your video editing and recording process, I like it as it neat clear and clean, thanks in advance
@SriHarshaChilakapati
@SriHarshaChilakapati 3 жыл бұрын
Name some characters who grow younger over time: 1) Aunt May in Spider Man movies 2) Hitesh Choudhary (from 19 and half to 16)
@yogeshukidwe9133
@yogeshukidwe9133 3 жыл бұрын
Superb, abhi picture ka hero aya
@rohandas5563
@rohandas5563 3 жыл бұрын
I think struct is a more of a user defined datatype than a class replacement..is it?
@himanshubanerji8800
@himanshubanerji8800 4 күн бұрын
I want to go back to Java already, this Go gets more and more complex as I learn
@utkarshtyagi3305
@utkarshtyagi3305 2 жыл бұрын
A question.Do we keep the first letter capital because it's a good practice that everything that needs to be publicly available should be like this or it's like a complusion without which it would not be possible to access these publicly?
@yadneshkhode3091
@yadneshkhode3091 Жыл бұрын
compulsion
@sahilkachhap
@sahilkachhap 3 жыл бұрын
Sir, I kept age and status starting with lowercase (age, status), still it's getting exported while printing each value, I didn't get what is the difference between naming with uppercase (Age) and lowercase (age)
@viganeshsmac1269
@viganeshsmac1269 2 жыл бұрын
Try exporting the struct to different package and access the fields inside it. You will get to know the difference :-).
@hiteshbavskar5121
@hiteshbavskar5121 2 жыл бұрын
it will give u blank values if u try to access it from out side like in lambda functions in aws
@ashishpradhan1027
@ashishpradhan1027 9 ай бұрын
In case anyone wants to automate the process of creating the folder and all. package main import ( "bufio" "fmt" "log" "os" "runtime" "strings" ) func main() { fmt.Println("Welcome to a fun project!!") fmt.Println("It allows you to create a boiler plate go folder") reader := bufio.NewReader(os.Stdin) fmt.Println("What would you like to name the folder") inputFoler, err := reader.ReadString(' ') if err != nil { fmt.Printf("Not able to get user input") } inputFoler = strings.TrimSpace(inputFoler) err = os.Mkdir(inputFoler, 0750) if err != nil { log.Fatal("Not able to create folder, cannot proceed") } err = os.WriteFile(inputFoler+"/main.go", []byte("package main func main() { }"), 0660) if err != nil { log.Fatal("Not able to create folder, cannot proceed") } err = os.WriteFile(inputFoler+"/go.mod", []byte("module "+inputFoler+" "+"go "+strings.Join(strings.Split( runtime.Version(), "go")," ")), 0660) if err != nil { log.Fatal("Not able to create folder, cannot proceed") } }
@a3393962
@a3393962 Жыл бұрын
Hi, would you add interface in this tutorial?
@shrianshagarwal9238
@shrianshagarwal9238 Жыл бұрын
Auto-Formatting not happening for me, what can be the reason for it ?
@davida.7586
@davida.7586 3 жыл бұрын
The usage of Printf( ... ) will confuse learners. It would be good to first show how to access Struct values by name like : hitesh.Name ... then try to use it in other methods like Printf... Thanks anyway !
@FaerdKamrat
@FaerdKamrat 2 жыл бұрын
i dont agree
@swapniljain3490
@swapniljain3490 3 жыл бұрын
Thank you so much😍😍
@MuhammedMuhammed-of5bd
@MuhammedMuhammed-of5bd 4 ай бұрын
thankyou sir
@doctype1918
@doctype1918 Жыл бұрын
this is like interface in typescript
@photoshopwebflippy2870
@photoshopwebflippy2870 3 жыл бұрын
Hey I run a movie app so I have a question regarding copyright what if I use an webview app to upload on playstore Which is redirected to my movie app's downloading website can I still get copyright on my app?
@kumarshubham919
@kumarshubham919 3 жыл бұрын
In last Saturday live, you were 19🤣
@soniapaul288
@soniapaul288 3 жыл бұрын
OMG, 68 likes and not a single dislike😄😄😄😄😄😄
@shaayarkasafar
@shaayarkasafar Жыл бұрын
similar to C
@BIKRAMShaw
@BIKRAMShaw 3 жыл бұрын
Fst
@Mikola1982Lt
@Mikola1982Lt Жыл бұрын
waste my time ((((
If else in golang
8:38
Hitesh Choudhary
Рет қаралды 28 М.
Channels and Deadlock in golang
18:39
Hitesh Choudhary
Рет қаралды 27 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 61 МЛН
This is your last video about Golang Structs!
15:57
Flo Woelki
Рет қаралды 10 М.
Slices in golang
14:58
Hitesh Choudhary
Рет қаралды 45 М.
The Most Efficient Struct Configuration Pattern For Golang
11:10
Pros vs Cons of When to USE Pointers in Golang
7:53
Melkey
Рет қаралды 12 М.
Concurrency and goroutines in golang
13:18
Hitesh Choudhary
Рет қаралды 44 М.
This Will Make Everyone Understand Golang Interfaces
21:03
Anthony GG
Рет қаралды 56 М.
Golang Tutorial #20 - Structs and Custom Types
18:49
Tech With Tim
Рет қаралды 52 М.
Creating custom struct tags in Golang is awesome!
24:42
Flo Woelki
Рет қаралды 10 М.
Advanced Golang: Channels, Context and Interfaces Explained
22:17
Code With Ryan
Рет қаралды 127 М.