Viswajith Venugopal 650e119f22
Update go-server template to include the conventional generated code line (#18304)
* Update go-server template to include the conventional generated code line

Follow the convention from https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source.

The generated go client code already follows this: f357be480e/modules/openapi-generator/src/main/resources/go/partial_header.mustache (L18)

* gen files

* Move to top
2024-04-07 21:23:24 +08:00

37 lines
1.0 KiB
Go

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
/*
* OpenAPI Petstore
*
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* API version: 1.0.0
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package main
import (
"log"
"net/http"
petstoreserver "github.com/GIT_USER_ID/GIT_REPO_ID/go"
)
func main() {
log.Printf("Server started")
PetAPIService := petstoreserver.NewPetAPIService()
PetAPIController := petstoreserver.NewPetAPIController(PetAPIService)
StoreAPIService := petstoreserver.NewStoreAPIService()
StoreAPIController := petstoreserver.NewStoreAPIController(StoreAPIService)
UserAPIService := petstoreserver.NewUserAPIService()
UserAPIController := petstoreserver.NewUserAPIController(UserAPIService)
router := petstoreserver.NewRouter(PetAPIController, StoreAPIController, UserAPIController)
log.Fatal(http.ListenAndServe(":8080", router))
}