This is why languages need good documentation.
It seems like it’s a booming industry though. I mean, there are entire sites like udemy where amateurs teach amateurs things they’ll never use in a real job, and that place, and others like it, seems to be doing just fine. Hell, every PACKT book ever written was worth more as blank paper.
Why do I care? I’m an external examiner, sometimes I need to read some of these god awful books to see what students are expected to know. I’m not sure why professors ever stray from the true CS classics, but they unfortunately do. Especially at the academy level.
LoL
Here in India every kid de-facto refers to few content farm websites and while they are not outright wrong, there will always be subtle errors, as the content is contributed by other students only. And books - the textbooks are so unpopular and not even available on libgen.
Day by day, academia seems more like a drug cartel.
I feel like there's something a bit off about charging money teaching a skill that I haven't personally used extensively in a professional context. I guess others feel differently
1. git init
2. git remote add %something%
3. go mod init %name_of_your_module% (where in most common case name is your repo address without the https part)
4. https://github.com/golang-standards/project-layout - this repo has the default project structure. Each subfolder has README that describes the purpose of the folder
5. go get -u github.com/gin-gonic/gin to add gin (web lib) for your project. Same for any other package. The will be added to your go.mod and go.sum files
5.1 import "github.com/gin-gonic/gin" in your code to use gin
5.2 package may have more than one major version (tag). If you want to use package at latest tag 2 - you add '/v2' when you 'go get' the package (i.e. go get -u github.com/gin-gonic/gin/v2)
6. git commit && git push to publish
7. Not sure what to you mean by 'fork&clone&submit&pr including 3rd party submodules'. You may use vendoring but in most cases you don't need it as you have your dependencies in your go.mod && go.sum files. You may want to read more about vendoring and gomodproxy though.
8. Testing is pretty easy but I guess you want and article about best practices? I won't post any link as I find the topic as too controversial regardless of the language\stack
9. CI - not sure that does this have to do with the language
10. haven't done much profiling or debugging to fill you in.
> https://github.com/golang-standards/project-layout
I was almost with you but please don't share that repo. It's a terrible layout and the docs aren't accurate. The issues are full of Go community folk saying it's misleading and looks official but isn't.
We are using similar layout (albeit we just need cmd and internal directories for most of our project) and it works perfectly.
Anyway - this is not Rails or any other framework were the developer may be dependent on project structure. I just shared a possible option.
>It's a terrible
Why though?
PS: I just realized it has golang-standards in its path. Okay, this part can actually be misleading.
In our team we have most projects structured like this:
/project-folder
|
|__/build (/.gitlab-ci for projects moved to our own gitlab instance)
|
|__/cmd (folder for your entrypoints. One or more if your projects generates more than 1 binary)
|__/bin_name1
|__/bin_name2
||__/internal (folder for your sources packages)
|__/config (package config)
|__/http (package HTTPServer, api, etc)
|__/api
|__/models
|__/database (package database)
|__...
||__/api (swagger and such)
|
|__/docs (godoc)
|
|__/.golangci.yml
|
|__...
Something like this.
Sometimes a 3rd party library needs a fix, and you want to fork it, add your changes, and run with it like that until your changes land in the upstream.
Last time I had to deal with it was a PITA, because libraries were fully qualified, and now I wanted to make an override. In Rust I would use https://doc.rust-lang.org/cargo/reference/overriding-depende...
In Go you can 'replace' a required package.
https://thewebivore.com/using-replace-in-go-mod-to-point-to-...
You can replace with local or remote package (for example if you have published fixed version somewhere and what your teammates to use it too until your changes land in the upstream.)
Yes! I'm always tempted to ask "How is this different or better than XYZ lang?"
I don't have the time/inclination to learn every new fangled language that comes by, so it would be nice to have an easy way to understand what scenarios any given language is best suited for.
For example, every time I read about Go, I'm left wondering: How is this better than C or Java? Presumably it's better in some ways I'm not perceiving, otherwise why would it be built and used?
Asking for a friend
Learning Elixir was tough for me until I found Dave Thomas' "Elixir for Programmers" where he skipped all of the basic stuff that every programmer is assumed to know and went right to what makes Elixir unique and how to leverage it correctly. (https://codestool.coding-gnome.com/courses/elixir-for-progra...)
I have been hunting for the same thing for the Go language for years because frankly I haven't been able to grok the appeal. I am hoping to find a 'Go for Programmers' one day. I asked on Reddit a while back and was pretty much handed the "what are variables" document.