Friday 25 August 2017

Go 1.9

Go 1.9 is released! 😊

Highlights are type aliases, marking test methods as helpers, monotonic time, and a new type Map, made for concurrent use.

See release news at the Go blog, and Go 1.9 release notes.

Monday 14 August 2017

Which git repository was changed again?

Sometimes, working across multiple git repositores, there is a need to have many of them dirty at the same time.

To find the status of multiple repositories below the same path, I wrote a tiny utility to show  git status -s  for them. The parameter -s stands for short, it just shows the changed or untracked files for a repository, that are not committed.

Have a look at the utility at github.com/borglefink/gitstat.

Thursday 10 August 2017

Cntsrc, a rewrite of countsource

My command line utility countsource has been rewritten. When starting refactoring, I realised I would like to keep the old one, so I just started fresh. That is - it does the same thing, so much of the code is very similar.

This time I added tests, and made it simpler to configure. It is written in a more idiomatic Go, as well. Have a look at the new cntsrc, at github.com/borglefink/cntsrc.

Tuesday 31 May 2016

Formatting Go code

One of the best features of the Go tool portfolio is the "go fmt" command, in my opinion. This takes a file or a directory as parameter, and formats the Go code in a predetermined coding style. This has several advantages (see go fmt your code):

  • it becomes easier to write code - never again worry about how to format code, just run the formatter
  • it becomes easier to read code, since all Go code easily can be formatted to the same style
  • it becomes easier to maintain for the same reason
  • all discussions or bickering about code formatting issues goes away instantly

All of this makes for easier development and removes "coding noise". Best of all, the Go formatter can be integrated into lots of editors and IDEs. Then the formatting becomes transparent, so all that needs to be done is saving the code, and the formatter is run automatically.

Wednesday 20 April 2016

Go 1.6

Go 1.6 was released in February 2016, with an update to 1.6.2 in April. Some major improvements are support for HTTP/2, changes to vendoring and important changes to cgo usage. Also some performance improvements to the garbage collector, and some packages.

Have a look at the release notes for more information.