{"repo":"quasilyte/go-consistent","free":true,"listed":false,"github":"https://github.com/quasilyte/go-consistent","clone":"git clone https://github.com/quasilyte/go-consistent.git","description":"Source code analyzer that helps you to make your Go programs more consistent.","language":"Go","stars":364,"topics":["go","golang","linter","source-code-analysis","consistency","consistency-checking","best-practices","dev-tools"],"license":"MIT","category":"dev-tools","readme_excerpt":"go-consistent Source code analyzer that helps you to make your Go programs more consistent. Quick start / Installation This install the go-consistent binary: If go install location is under your system $PATH , go-consistent command should be available after that. This should print the help message: You can pass package names and separate Go filenames to the go-consistent tool: You can also use std , ./... and other conventional targets that are normally understood by Go tools. If you want to check consistency of a single file or package, just provide their name If you want to check the whole project, you should pass all its packages as an arguments To check the entire project, run go-consistent like this: Overview To understand what go-consistent does, take a look at these 3 lines of code: lit1 , lit2 and m are initialized to an empty, non-nil map. The problem is that you have at least 2 ways to do it: 1. lit1 and lit2 use the first option, the map literal 2. m uses the second option, the make function Neither of these are the \"best\", but on the package or project level, you might want to prefer only one of them, for consistency reasons. go-consistent tool detects that map literal used more frequently (2 vs 1) in the example above, so it suggest you to replace m initialization expression to use map literal instead of make function. There are many similar cases where you have 2 or more options of expressing the same thing in Go, go-consistent tries to handle as much patterns a","default_branch":null,"files":null,"tree":[],"storefront":"/r/quasilyte","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/quasilyte/go-consistent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}