There are a few code generators for swagger. The answer kind of depends on which you are using, for example,
https://github.com/OpenAPITools/openapi-generator can generate a whole project or just some packages. It depends on the flags used.
In general, the
swagger generate client -f file.json command should generate some files. The files contain go code, and make up a package. You need to put these files into a project directory, in its own separate directory named after the package name. There are resources on how to structure your go repository like
this one. Then you import your generated package from another file ( could be main.go, or any other package and use it).
The first step would be to read the generated code and familiarise yourself with the public API.