We don’t know your library. It may be trivial or it may be a behemoth with complex state or algorithms. You need to consider tradeoffs with the extra complexity of competing memory management and marshalling when call C++ from Go, or extra time spent and introducing errors in porting, etc.