cherry-pick updated commits from czertbytes/go