运行os.Chown并升级特权

I need to run an os.Chown() on a directory, but I have no idea how to do this safely. I have the user that the binary runs as in sudoers, but since this is an internal function, how would I escalate privileges?

I don't want to shell to find or chown in Linux with a sudo, however, that would work. But is there a better option?