Error while running Go module to generate traffic

Hi!

My objective is to develop a Go module that generates different kinds of traffic that go through the core network and to the Internet.
While running the TestRegistration I’ve already achieved connectivity with the Internet since the ping comes back.
For now I haven’t developed anything, I’m just trying to make the ping work on my own Go file. To do so, I’ve copied the registration_test.go TestRegistration function to a Go file with the package main, and I have deleted the references to the testing (like assert.Nil(t,err) or changing err for _ in the functions that return the error). I attach the Go file.

My Go file is located in the root folder of free5gc. When I execute it with “go run”, after initiating both the UPF and the core network (I have to execute them in different terminals for it to work, I don’t know why), I’m getting the next error:

Any idea on how to fix it? Should I change the location/package of the file?

secondTry.txt (6.8 KB)

Regards,
Víctor.

P.D: The Go file is uploaded as .txt since the forum does not allow to upload.go files