Translation of filerelaytest.c in go