FYI a better patch for the STM32G0x is http://openocd.zylin.com/gitweb?p=openocd.git;a=commit;h=dcec354bfc756c4a4e1034c9461b5d3f4e55a63e
This leaves the STm32L4 code alone and creates a new, independent STM32G0x set of files.
I’ve been able to successfully build an openOCD binary which allows standard prog / debug on the STM32G070 using this patch and the guide mentioned above https://visualgdb.com/tutorials/arm/openocd/build/