Hello World with Webstorm - Go Programming Language Tutorial

Опубликовано: 08 Октябрь 2024
на канале: Tran Ngoc San
16
0

Hello World with Webstorm is a free tutorial by Todd Enso McLeod from Go Programming Language course
Link to this course(Special Discount):
https://www.udemy.com/course/learn-ho...
This is the best Go Programming Language Course
Course summary:
The ultimate comprehensive course
For beginners and experienced devs
Taught by a university professor
From beginning to advanced concepts
Concurrency, channels, benchmarking
Testing, error handling, documentation
Hands-on exercises with solutions
Access to valuable code base
This course is tried, tested, and proven
Over 2.65 Million students taught
Lifetime course access
Learn at your own pace
100% satisfaction guaranteed
English [Auto]
It in this video I don't know how to find funny great beginning of a video in this video we're going to do hello world with web store. It's going to be so awesome. And we're going to write the program we're going to see code completion that's going to be amazing. And then we're going to go to the terminal and we're going to form out our code by running go farm out our front. I'm not sure how you actually say this one. I'm going to just go with go format or folks because that's the way Scott. I don't know see I'm always confused. Know we're going to run it. We're going to see a program run. That's going to be amazing and awesome and I'll show you how to set your theme. Just in case you didn't get that we'll see that. All right. So let's go to a web forum. We are ready to go. OK. So first thing we need is a package main. There it is. Right. Package main first line and then I don't have to worry about imports. Right. It will recognize imports automatically Occasionally I might need to adjust it. But the first thing I do is just phunk main. And then you know my friends where I put in when I'm declaring it like here here are the parameters I'm declaring and when I'm using it those will be the arguments I pass in. But phunk main and that's it. And then vote frontline and look at that look at that code completion. I could go on here and I could see what are my different options. And it kind of gives me this idea of like oh you know here is what it takes it's variadic functions so it takes as many arguments as I want to pass on of any type since it says empty interface here and will learn what that means. Right and it returns in end and an error. So if I wanted to I could catch those and use them and I could check you know like how many you know. Well I'll show you what is what does that at. We'll see that in a second. All right so print line that's what I want and just. Hello world. And you'll notice like as soon as I like. Kind of did it. It brought my import in for me and my natural inclination is to come up here and hit her with the line between that. But before I do that I could come down to the terminal. I love it. I love it. We're rocking it. I could come down. Sorry if that's annoying. I could come down in the terminal and there's my terminal. Alternatively if I didn't see it I'd click just that little small square right there and I could choose terminal from right there. So right here I'm already you know at my folder where I'm writing my code. I just need to go into the one folder so I get a CD. Oh one hit tab to complete that. And now I am in my old one folder and I could go go fucked. So that's another go command. We're learning about we're learning about all these different Go commands. And just to remind you we could see the go commands by typing and go and write I typed in go and then there are all the go commands. And now we're learning about Go Fund. We're learning a lot of these different commands and I don't know why I love it. I just did control OK and it cleared out my window wasn't working in the other shell to get shell and this wouldn't totally work. So control click OK cleared my window. That's awesome. So I cleared my window. Now I'm going to run go defunct and it's going to format my code. I click back up here to see it and you could see it arranged my code in the way that says this is the way your code should be arranged. So that's awesome. Now I mentioned that hey variadic all that stuff. Here's something that's cool in it and I'm not I don't code in Windows I code on Macs I'm sometimes making little transitions on Mac and hold down command and go over something you see not turn blue here in Windows you hold them control and you go over something and then I could click that. And it brought me right to the source code of the standard library and it said Here it is. Here's the description. This is the exact same description that's in the documentation because the documentation is built off of the comments that are put in above things in your code. And so this is the exact same thing I'd see if I w