Goldberg’s theorem and the Baker–Campbell–Hausdorff formula