Go 1.9 released

Finally, new major version of Go programming language available now
28 August 2017   475

Great news for Go developers. New major version of Golang available now.

Let's see what's inside.

As we mentioned before, there were planned two major new features for Go 1.9. And they are finally available.

  1. Go now supports type aliases to support gradual code repair while moving a type between packages. The type alias design document and an article on refactoring cover the problem in detail. In short, a type alias declaration has the form:
    type T1 = T2
    This declaration introduces an alias name T1—an alternate spelling—for the type denoted by T2; that is, both T1and T2 denote the same type.
     
  2. A smaller language change is that the language specification now states when implementations are allowed to fuse floating point operations together, such as by using an architecture’s “fused multiply and add” (FMA) instruction to compute x*y + z without rounding the intermediate result x*y. To force the intermediate rounding, write float64(x*y) + z.

 Also, here are some interesting updates:

  • The new math/bits package provides bit counting and manipulation functions for unsigned integers, implemented by special CPU instructions when possible. For example, on x86-64 systems, bits.TrailingZeros(x) uses theBSF instruction.
  • The sync package has added a new Map type, safe for concurrent access. It is not a general replacement for Go's map type.
  • The testing package also has an addition. The new Helper method, added to both testing.T and testing.B, marks the calling function as a test helper function. When the testing package prints file and line information, it shows the location of the call to a helper function instead of a line in the helper function itself.

Learn more at release notes

Brigade launched

Event-driven scripting tool for Kubernetes released by Microsoft
31 October 2017   453

Microsoft has unveiled its new Open Source development for the needs of DevOps, a Brigade utility designed to run scripts that are executed on a Kubernetes cluster on an event.

The Brigade utility was created by former employees of Deis, a company that Microsoft bought earlier this year. Deis was working on Kubernetes, Helm and Draft. The purpose of Brigade is to "script simple and complex workflows using JavaScript." The solution allows to associate containers by running them sequentially or in parallel and invoking scripts based on time, events in GitHub (also supported by "DockerHub and other popular web services"), push operations in Docker or other triggers. Readme of the project describes it as "a tool for creating pipelines for Kubernetes".

Brigade architecture
Brigade architecture 

Brigade is written in Go and TypeScript / JavaScript, it functions as a service inside Kubernetes. The job (task) in Brigade is a JavaScript script that is interpreted by the product service, which leads to the creation of the necessary resources in Kubernetes. Next, Brigade expects events and performs the corresponding task trigger. It is assumed that the new solution is well suited for the tasks of continuous integration and delivery of applications (CI / CD), tk. simplifies automated testing, assembly of artifacts and releases, management of software deployment.

Check GitHub for more information.