simple

command
v0.0.0-...-259e43b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 6, 2021 License: MIT Imports: 2 Imported by: 0

README

1. 生成 wire文件

wire

2.运行

go run wire_gen.go main.go
wire_gen文件内容如下
// Code generated by Wire. DO NOT EDIT.

//go:generate go run github.com/google/wire/cmd/wire
//+build !wireinject

package main

// Injectors from wire.go:

func InitializeBusiness() *Business {
	db := NewDB()
	dao := NewDao(db)
	business := NewBusiness(dao)
	return business
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL