Check package and goos programatically