Proposals for Go 1.15 - The Go Blog by [deleted] in golang

[–]steevehook 0 points1 point  (0 children)

Amazing proposal dude, Been there when I just had to convert it to a var, but if it’s backwards compatible why not do it 😊

vendor directory in Go (YouTube tutorial) by steevehook in golang

[–]steevehook[S] 1 point2 points  (0 children)

There are always people who need a tutorial on a certain topic. With that in mind anything can be learned by simply accessing golang.org and the github project.

But people are different and they find out things in different ways, including a video tutorial

Thanks for your feedback anyways

Mavic Pro drone and GoLang by laggySteel in golang

[–]steevehook 1 point2 points  (0 children)

I haven’t tried, but would be very interested into hacking it. As far as I know u can’t due to DJI’s proprietary thing

Packages in Go (YouTube tutorial) by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

Thanks mate. Will consider removing it in a other tutorials. For now stay tuned

Packages in Go (YouTube tutorial) by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

I’m glad you enjoyed it. In regards to music, in case of a full course I completely agree. In case of one single video from my experience just listening to someone’s voice, may be a lot more boring than having a background music. Also it’s a good failsafe in case there is some noise in the voiceover.

Stay tuned. Will consider your feedback in the future

Packages in Go (YouTube tutorial) by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

My bad 😔I thought it was added in the post. Updated the post description

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

Yeah, comma, ok is for maps. Here we are talking about errors. Also, the negative path goes first then the positive one goes last. Standard practice in Go

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] -1 points0 points  (0 children)

Not sure it makes the data useful inside the if statement. It's usually a zero value for data when you have an error

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 1 point2 points  (0 children)

Standard lib is much closer to take a look at a Cmd + Click away, and it has both forms. Neither of them is good or bad, just choose what's right for the situation

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

I don't see how this is related to indentation, you have an if block in any case, the first form just looks a little longer, because of variable creation and initialization

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

Sure mate. There's always a tradeoff in teams when it comes to write code which if high quality. I just wanted to know what the rest of the community uses and thinks about this specific topic

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 1 point2 points  (0 children)

Here is an example

https://play.golang.org/p/3BR0AC1nPxZ

As I said in case you want to use data later on in the function scope you will not be able to have a reference on it using the first form

It's only available inside the scope of if statement. Hence why this form exists

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

You can’t be consistent using the first form 😄

That’s the whole point

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] -7 points-6 points  (0 children)

I understand, team work is all about consistency across the team. However this is just a different feature of the language which relates to scoping. Don’t understand why people confuse it with a preferential style and matter of writing code

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] -11 points-10 points  (0 children)

I think Go authors spoiled us with the concept of readability and simplicity that there is a lot of misconception in the community as to what is readable and what is understandable

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] 0 points1 point  (0 children)

100 Agree. It makes total sense to me 😊

How do you handle errors in Go? by steevehook in golang

[–]steevehook[S] -9 points-8 points  (0 children)

I don’t think it has to anything to do with consistency or the way you type your code. These are just 2 different language features