Golang: Working with Gzip and Tar

Gzip Gzip is another file compression format that was created to replace the compress program used in early unix system. It is normally used to compress just single files. Compressed archives are created by packaging collections of files into a single tar archive, and then compressing that archive with gzip. The final .tar.gz or .tgz file is a tarball. Compressing a file Compressing operation is very simple to implement. The package exposes gzip....

September 27, 2015 · 4 min · Svetlin Ralchev

Golang: Working with ZIP archives

Golang has several packages that work with different type of archives. In this post I will show you how to use archive/zip package to compress and uncompress zip archives. Zip is one of the most common file formats. It supports lossless data compression of one ore more files and directories. Extracting You can read the content of zip package by using zip reader. Its File property exposes all files and directories of particular zip package....

September 20, 2015 · 2 min · Svetlin Ralchev

Golang code inspection tools

As a software engineer, you always try to improve the quality of your programs. We are looking for the best software development practices and TDD techniques. "Have no fear of perfection - you'll never reach it." ― Salvador Dalí In this article we will explore different code inspection tools in Go ecosystem. We will increase our code quality and engineering skills by running tools that will do analysis on our code base and report the suspicious parts of it....

September 13, 2015 · 7 min · Svetlin Ralchev

Golang code comprehension tools

Software engineers spend a greater part of time reading and understanding programs. Indeed, most of the time it takes to develop a program is spent reading it and making logical conclusion about what it does. Go programmers are no exception. Thanks to gofmt they should not worry about source code formatting. The machines are better suited to analyse source code and accomplish comprehension tasks than us. In this article we will explore several of Go comprehension tools that are responsible for locating definitions, ascertaining types of expressions, deducing implementation relation, computing method sets, finding callers/callees, jumping through channels, understanding aliasing....

September 6, 2015 · 3 min · Svetlin Ralchev

Golang refactoring tools

Go language provides many useful tools as part of its development eco system. We will explore most of them in the upcoming blog posts. But in the article lets focus on refactoring tools. Gofmt In average programming languages developers can adapt to different formatting styles. Common problem is how to approach unknown code base without a long prescriptive style guide. Go takes an unusual approach and keep this responsibility to format the source code for you....

August 30, 2015 · 6 min · Svetlin Ralchev