Comparing Versions In Go

If you're using Go and working with Semantic Versioning (SemVer) there are occasions you want to compare version within a Go application. The standard library doesn't have a package that can do this. Luckily, there are some community packages that can help. Here we'll look at two suck packages with differing feature sets.

Continue Reading »


Package Versions, A Problem For Many Go Projects

In the Go toolchain there is a convenient way to install and use external packages. If a feature isn't in the standard library and is common there's likely a package you can easy reference and install with go get to provide you with what you need.

But, what version of that package are you using? Is it a stable release? Is there a newer version with a bugfix or security update? How can you tell?

Continue Reading »


Cookoo 1.2.0 Released

Cookoo, a chain-of-command framework for Go, has recently picked up active development again and with that comes the 1.2.0 release. Version 1.2.0 brings numerous bug fixes and new features.

Chief among the new features is a new syntax for defining routes that's similar to cli.go. With this new syntax you can define routes like:

reg, router, cxt := Cookoo()
reg.AddRoute(Route{
    Name: "test",
    Does: Tasks{
        CmdDef{
            Name: "cmdDef",
            Def:  &mystruct{},
            Using: []Param{
                {Name: "funty", DefaultValue: 5},
                {Name: "StrField", DefaultValue: "Batty"},
            },
        },
    },
})

In addition to this feature additions include:

  • Improvements to the way CLI arguments are handled and the way CLI applications can be created.
  • @shutdown route for the web server.
  • safely.GoDo - The safely sub-package helps you run goroutines while handling panics on them.
  • A new getter interface.
  • Several more you can read in the release announcement.

Continue Reading »


Other Recent Posts: