1. step 1 related command(download swagger, then use related command)
go mod init xxx(this name you can give any name, up to you)------ generate go.mod automatically
Go build main.go (update go.mod file and create go.sum file automatically)
When you import a new package, you need to use command "go mod vendor" to download
2. step 2 main.go code
package main
import (
// "github.com/swaggo/swag/example/celler/controller"
// _ "github.com/swaggo/swag/example/celler/docs"
_ "xxx/docs"
"github.com/gin-gonic/gin"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"fmt"
"net/http"<