The dexcom_reader had support to read and write the battery charging. This can be used to stop the charging with udev. See https://github.com/PieterGit/dexcom_reader/blob/master/dexcom_reader/bat.py for an example with the dexcom_reader.
Can you please implement this in the Go libraries?