Lessons learned porting 50k loc from Java to Go
When porting Java tests to Go, it was very useful to be able to capture the HTTP traffic between Java client and server and compare it with HTTP traffic generated by Go port. As a result a library implementing some functionality has the same access to other classes in the same library as external code using that library. To replicate chaining in Go I used an “stateful error” approach:
This can be chained:
Java doesn’t have a built-in marshaling and the client uses Jackson JSON library.
Source: blog.kowalczyk.info