尝试重新创建Web服务的模拟版本

am trying to emulate some API's in go for testing- i dont have the sourcecode for the original API, but i can call them.

The thing im struggling with here now is that some of them have abit different format in the calling part as im used to as there doesnt seems to be a filename just data - i have 3 postman snapshots here how it looks when you call the original webservice ( it uploads a csv file ) :

enter image description here

enter image description here

enter image description here

If i try to use a handler like this it panics :

file, handler, err := r.FormFile("File")
defer file.Close()

// copy example
f, err := os.OpenFile("./downloaded", os.O_WRONLY|os.O_CREATE, 0666)
defer f.Close()
io.Copy(f, file)

It fails in the call to FormFile - i have an idea that its because of the File is in body ? anyone can guide me into a direction where i can make it work serverside in Go with the client call from postman ?

edit : the panic it throws is :

runtime error: invalid memory address or nil pointer dereference