)]}'
{
  "commit": "bfd5150e4e41705ded2129ec33379de1cb90b513",
  "tree": "1d136848862d24a94aa103ecbd726c468bf56d1b",
  "parents": [
    "248dadf4e9068a0b3e79f02ed0a610d935de5302"
  ],
  "author": {
    "name": "Bradley Falzon",
    "email": "brad@teambrad.net",
    "time": "Tue Feb 28 08:30:37 2017 +1030"
  },
  "committer": {
    "name": "Dave Cheney",
    "email": "dave@cheney.net",
    "time": "Tue Feb 28 09:00:37 2017 +1100"
  },
  "message": "Move benchmark assigned err to global exported variable (#106)\n\ntoperr is not used, but the go compiler itself doesn\u0027t detect this\r\nbecause it\u0027s within an anonymous function. However, go/types does\r\ndetect this as being unused, which causes any static analysis tools\r\nwhich uses go/types\u0027 type checker to fail with the message \"toperr\r\nassigned and not used\".\r\n\r\nThe final result of the benchmarked function is instead assigned to\r\nan exported global variable to ensure the compiler cannot now, nor\r\nin the future optimise away the function calls due to no observable\r\nside effects.\r\n\r\nIt was chosen to assign the final result, after the benchmark loop,\r\nto the global variable, as this best follows the example set in the\r\nCL https://go-review.googlesource.com/#/c/37195/. As opposed to\r\nhaving each call to f assign to the global. This also appears to\r\nbetter align with the original author\u0027s intention of toperr.\r\n\r\nThis change had no observable impact on the benchmark.\r\n\r\nRelated https://github.com/golang/go/issues/3059.\r\nRelated https://github.com/golang/go/issues/8560.\r\n\r\nThanks dominikh for additional clarifications.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "dbee1c006954141d6df04d44e0f01c892ff1d494",
      "old_mode": 33188,
      "old_path": "bench_test.go",
      "new_id": "903b5f2d48bc3f13ced22c854fadfcb496bec05a",
      "new_mode": 33188,
      "new_path": "bench_test.go"
    }
  ]
}
