wire.go 676 Bytes
Newer Older
kzkzzzz's avatar
kzkzzzz committed
1
//go:build wireinject
kzkzzzz's avatar
kzkzzzz committed
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
// +build wireinject

// The build tag makes sure the stub is not built in the final build.

package main

import (
	"github.com/go-kratos/kratos-layout/internal/biz"
	"github.com/go-kratos/kratos-layout/internal/conf"
	"github.com/go-kratos/kratos-layout/internal/data"
	"github.com/go-kratos/kratos-layout/internal/server"
	"github.com/go-kratos/kratos-layout/internal/service"
	"github.com/go-kratos/kratos/v2"
	"github.com/google/wire"
)

// wireApp init kratos application.
kzkzzzz's avatar
kzkzzzz committed
19
func wireApp(*conf.Server, *conf.Data) (*kratos.App, func(), error) {
kzkzzzz's avatar
kzkzzzz committed
20 21
	panic(wire.Build(server.ProviderSet, data.ProviderSet, biz.ProviderSet, service.ProviderSet, newApp))
}