youtu_ecpm/cmd/wire.go
2025-01-15 10:09:03 +08:00

23 lines
481 B
Go

//go:build wireinject
// +build wireinject
// The build tag makes sure the stub is not built in the final build.
package main
import (
"github.com/google/wire"
"go.uber.org/zap"
ecpm_httpserver "youtu_ecpm/api/gin"
"youtu_ecpm/dao/query"
"youtu_ecpm/server"
)
// wireApp init kratos application.
func wireApp(log *zap.Logger, q *query.Query) (*server.EcpmApp, func(), error) {
panic(wire.Build(
wire.Value(q),
server.NewEcpmApp,
ecpm_httpserver.NewHttpServer,
))
}