Switch case in golang and online playground

  Рет қаралды 26,328

Hitesh Choudhary

Hitesh Choudhary

Күн бұрын

Пікірлер
@smaranh
@smaranh 3 жыл бұрын
Thanks for clarifying the fixed value in Go Playground regarding the seed value. I did run into that and did not understand why that happened.
@priyeshranjan5235
@priyeshranjan5235 8 ай бұрын
Quick Update!! after GO 1.20 we do not need rand.seed() is deprecated we can use directly rand.Intn() func main() { fmt.Println("Switch and case in golang") diceNumber := rand.Intn(6) +1 fmt.Println("Value of dice is ", diceNumber) switch diceNumber { case 1: fmt.Println("Dice value is 1 and now you can open") case 2: fmt.Println("You can move 2 spot") case 3: fmt.Println("You can move 3 spot") fallthrough case 4: fmt.Println("You can move 4 spot") fallthrough case 5: fmt.Println("You can move 5 spot") case 6: fmt.Println("You can move 6 spot and roll dice again") default: fmt.Println("What was that!") } }
@sohamkadam5018
@sohamkadam5018 5 ай бұрын
Thanks for sharing
@SUMITKUMARSHAW-km4fz
@SUMITKUMARSHAW-km4fz 4 ай бұрын
Thanks for sharing
@HarishSivaraman
@HarishSivaraman 4 ай бұрын
thanks for sharing
@FFGAMING-dr4dh
@FFGAMING-dr4dh 3 ай бұрын
thanks for info
@suryanshgarg3537
@suryanshgarg3537 2 ай бұрын
great
@ayushgautam6740
@ayushgautam6740 11 ай бұрын
Amazing Video. 🔥🔥
@fantsy3274
@fantsy3274 Жыл бұрын
Thanks for clarifying the fixed value in Go Playground regarding the seed value. But Sir in my case if we are not using the seed then it will work into the playground
@SakshamKarnawat
@SakshamKarnawat Жыл бұрын
That's because the math/rand functions got updated. There's no need to use the seed now, either in playground or in own system IDE. It gives a random value in all the cases now, without the use of seed.
@okeyshourovroy2769
@okeyshourovroy2769 3 жыл бұрын
First. And loving this series. A small request sir. Please come with a series with tensorflowjs 😀
@malaimama
@malaimama 3 ай бұрын
Amazing Video
@deepak_hp
@deepak_hp 3 жыл бұрын
can any please let me know why "break" is not used!?
@Hengul
@Hengul 3 жыл бұрын
Sir please add this Go series videos to a New playlist. That will be helpful.
@pranav_at_yt
@pranav_at_yt 3 жыл бұрын
Plz make a video on open ai codex
@finesttelugusongs2198
@finesttelugusongs2198 2 жыл бұрын
hi, one doubt i didn't get [ rand.Seed(time.Now().UnixNano()) ] whats happening in this line. will someone explain to me? Thank you
@nithiln7347
@nithiln7347 2 жыл бұрын
That is explained in this episode kzbin.info/www/bejne/r4HIio1mhtqmprc
@ronix-
@ronix- 9 ай бұрын
it's because in the new version of Go, rand does not need to be seeded, it will automatically seed with a random value while execution of the program
@SeedArt-f9b
@SeedArt-f9b 9 ай бұрын
oh@@ronix-
@vimalrijal8717
@vimalrijal8717 3 жыл бұрын
Nice
@MuhammedMuhammed-of5bd
@MuhammedMuhammed-of5bd 4 ай бұрын
thankyou sir
@khizrshaikh9902
@khizrshaikh9902 3 жыл бұрын
First I want Heart
@mrrishiraj88
@mrrishiraj88 3 жыл бұрын
🙏👍
Loop break continue and goto in golang
12:20
Hitesh Choudhary
Рет қаралды 27 М.
Handling routes and testing routes in golang
20:25
Hitesh Choudhary
Рет қаралды 18 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 157 МЛН
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 695 М.
Сестра обхитрила!
00:17
Victoria Portfolio
Рет қаралды 623 М.
A long video on MOD in golang
27:16
Hitesh Choudhary
Рет қаралды 36 М.
Race Condition in golang
18:46
Hitesh Choudhary
Рет қаралды 22 М.
Working with files in golang
12:40
Hitesh Choudhary
Рет қаралды 42 М.
Golang: The Last Interface Explanation You'll Ever Need
17:58
Flo Woelki
Рет қаралды 24 М.
Go Pointers: When & How To Use Them Efficiently
14:09
Anthony GG
Рет қаралды 88 М.
Introducing The GoTTH Stack - Go, Tailwind CSS, Templ & HTMX
28:29
Pros vs Cons of When to USE Pointers in Golang
7:53
Melkey
Рет қаралды 12 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 82 М.
HTMX & Go with ThePrimeagen | Preview
15:58
Frontend Masters
Рет қаралды 156 М.
Мясо вегана? 🧐 @Whatthefshow
01:01
История одного вокалиста
Рет қаралды 7 МЛН