GithubHelp home page GithubHelp logo

how-i-start-go's People

Contributors

mukhtar avatar peterbourgon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

how-i-start-go's Issues

Missing a few imports

Went thru this tutorial today and enjoyed it!
I especially like how it gave a practical example for using goroutines & channels.

Only problem I noticed is that near the end of the tutorial here: http://howistart.org/posts/go/1
your code won't compile because you use the "time" and "log" variables without ever specifying the import statements for either one. This isn't necessarily the worst thing in the world, since it gets people to think more carefully about what they're doing (kinda like my college professors LOVED to do). But just in case you weren't aware, I thought I'd post here.

Elegantly handling the goroutines

Hey @peterbourgon

Thanks for the excellent article. ❤️
It taught me a lot about developing clean handlers in Go.

In general, I had a conceptual question regarding the handling erroneous goroutines i.e. goroutines returning an error.

Suppose I have 10 different weatherProviders and I use concurrency to fetch the temperature from all of them using 10 goroutines. Now, if the fastest of these providers return an error, the multiWeatherProvider returns according to the current implementation.
However, all the other 9 goroutines are still running in background, right?

  • Does this not result in a resource leak in terms of memory?
  • Should we not wait for all of them to complete and then decide upon the response?
  • What should be the best practice here?

[NOT AN ISSUE] Well done

This is an extremely good introductory tutorial to Go, Peter. IMHO, it has the perfect mix of "how to" for beginners and introducing more essential topics/concepts (like interfaces). The result is making the reader want to know more. Thanks for sharing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.