5

I started learning Golang, at first sign I like it since I came from C++ background so seems very friendly at first sight.

Yesterday I took some time to read algorithms and data structures book and some patterns of language looks quite different for me anyway.

Someone has a good detailed explained book, tutorial or whatever for Golang to share?

I tried the documentation but I didn't understand it too much, looks very advanced for someone is newbie on the language.

Comments
  • 1
    @shoop how long took to you start deploy products? I'm doing a streaming app and I read about Golang be good for this kind of type of service.
  • 3
    @messhias golang compiles all in one binary. so deployment is done with one binary.
  • 1
    @stop so I can create packages and binaries easily like C++ right?
  • 2
    @messhias golang usually doesnt need makefiles and has everything to build binaries for windows, linux and mac. depencies are managed by go itself and modules make it even easier. So c++ is harder in my opinion.
  • 1
    @stop yes, C++ on this case it's more harder. But my goal was to understand if the go works at the same way.
  • 2
    @messhias
    go has (especially since 1.12) and diffferent architecture than c++
  • 2
    @messhias Watch some talks by dave cheney. He talks about important stuff.

    1. Use a good go IDE, and pay attention to warnings.
    2. goroutines, and variable scoping is important! pay attention to it.
    3. Try not to leak stuff. It is subtle, and requires some experience.
    4. Use the race detector. Maps are not thread safe!
    5. Use modules. But be very carefull when you do. Go has some weird ideas about versioning, and old packages can disapear...
  • 0
    @magicMirror I read about that, it's uses git repositories and everything seems attached to master branch.

    It's very nice, but stupid at same time because you be risk to be always with some bugged version.
  • 2
    @messhias The broken master thing is not the problem.
    proper go modules use tags. semver, and based on git tags. So no breaks, if tagged version is stable.
    The real issue is that there is the possibility that the whole library can be removed from github (or wherever), and then your build will break... you need to keep updating dependencies to avoid that.
  • 0
    @messhias since 1.12 you can also use git branches.
    go get domain/repo@branch
Add Comment