Implemented a Go version of the C++ attempt_ext