Code awesome Go libraries

Iván Corrales Solera
Wesovi Labs
Published in
3 min readDec 27, 2018

To have a good idea won’t guarantee your project is succeed. You need to apply the best practices to make it well-known.

Docs

  • README.md: It provides a functional description about what the project does. An example can found here
  • LICENSE.md: It gives information for developers can contribute to the project. Read more in this link
  • CONTRIBUTING.md: It provides the steps to be followed to contribute to our project. Nice template here
  • CHANGELOG.md: It contains a curated, chronologically ordered list of notable changes for each version of a project. Lear more here
  • Wiki: Beside of the documentation in our code, we should provide a Wiki. Learn more here

Code style

  • Linters: It force us to develop code by following the best practices. I’m a huge fan of golangci because it provides a big set of linters and it’s easy to integrate with projects.
  • fmt: Code should be formatted before pushing it into repository.

Testing

High test coverage for your project won’t guarantee a project without bugs. On the other hand, a high coverage makes your project easier to understand by other people.

Makefile

Thanks to Makefiles, your go development process is more effective and fluent. A nice example be found here.

Continuous Integration

Integrate a CI tool to your project and display the status in your README.md. Best known ci tools are Travis and Circle. Several examples can be found on the net.

Releases

Create new releases of your project as long as new functionality needs to be provided. bugs fixed for previous releases.

Semantic versioning is the way to name our releases. A nice article can be found here

Issues & Pull Requests

  • Create issues for both new features and detected bugs.
  • Just push code into master branch through pull requests. Even though you’re the only contributor, make your changes go through a code review process just like anyone else’s contributions..

Badges

  • goreportcard.com: Guarantee your project apply the best go practices.
  • godoc.org: Official documentation for go packages.
  • codecov.io: There’s many similar tools, but I bet for this because it

There’re many other sites in which you could obtain badges.

Announce your project

Let’s people know about your project

Be awesome!

When your project is mature enough and you went through the above steps, you should make your project part of awesome-go community.

https://github.com/avelino/awesome-go

--

--