I am new to go and cannot really put my head around it. I want to override a func in an existing package in go "log4go" on every log4go.Error("An error") call. What is the best way to do it? If I want to enhance an existing method, what else could be the way? Please bear if its a basic question.
You simply cannot do this. There is no "best way" to do something impossible.
All you have are alternatives:
log4go.Error
but your own wrapper myError
which wraps around log4go's Error function.