Error when carrying out a test

Hi everyone, i have been getting this errror and i still dont undertstand it.
cannot use data (type Data) as type map[string]string in argument to s.client.PutQf
cannot use &data (type *Data) as type map[string]string in argument to s.client.PutQf
cannot use nil as type string in argument to s.client.PutQf

Look for the types of parameters s.client.PutQf in your code or the library you are using, and compare those to the types of the argument you are calling it with.

The types quoted above do not match. You are trying to pass a Data and a *Data where map[string]string is expected for req and queryParams, respectively. Also, you are trying to pass nil for a string.

Maybe you want

data := make(map[string]string)
data["Foo"]="bar"
err := s.client.PutQf(context.Background(), data, data, "/put")
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.