)]}'
{
  "commit": "8c4c4ae446ca0804c9314108c306983f10e89b7f",
  "tree": "935bd26af429028f0d558d36f2b7788f69a92666",
  "parents": [
    "9b1c943dd106831bb1a4186be7bdc076abd28911"
  ],
  "author": {
    "name": "Pierre Gimalac",
    "email": "pierre.gimalac@datadoghq.com",
    "time": "Sun Jan 11 23:42:07 2026 +0100"
  },
  "committer": {
    "name": "Michael Stapelberg",
    "email": "stapelberg@google.com",
    "time": "Fri Jan 16 03:41:54 2026 -0800"
  },
  "message": "internal/descfmt: replace uses of MethodByName with direct calls when possible\n\nUpdate internal/descfmt/stringer.go to avoid calling MethodByName when possible.\nMethodByName allows calling a method even when the signature is unknown, but it forces the linker to keep all methods with a matching name, increasing binary size with dead code. On the other hand casting to an interface only keeps methods with a matching signature.\nUsing MethodByName also bypasses compiler typing, so making a direct call is safer.\n\nIn this specific case, the code checks whether a type implements an interface or is a specific type before using MethodByName and FieldByName to access its methods and fields, so we can just access them directly.\n\nI checked the size difference for the datadog-agent and kubernetes binaries (ranging from 20 to 100MiB), and the resulting gains were between 100 and 300kiB, which is small but not negligible.\n\nThis is a follow-up of https://go.dev/cl/734280.\n\nFixes golang/protobuf#1708\nChange-Id: Ib6ca16f7f7a871c8625d934c6115b47e525a42e9\nReviewed-on: https://go-review.googlesource.com/c/protobuf/+/735401\nReviewed-by: Lasse Folger \u003classefolger@google.com\u003e\nLUCI-TryBot-Result: Go LUCI \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nReviewed-by: Michael Stapelberg \u003cstapelberg@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "caa7e80da10394bf61e5b232bce9521bdb1ffa2c",
      "old_mode": 33188,
      "old_path": "internal/descfmt/stringer.go",
      "new_id": "0b0dfacbe5a2f19ad6b148d05a298d9c6c1883fd",
      "new_mode": 33188,
      "new_path": "internal/descfmt/stringer.go"
    }
  ]
}
