Made compatible with Go 1