-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,13 +55,13 @@ See [more examples here](https://github.com/Bin-Huang/make-constructor/tree/mast | |
Without manual installation, just add this comment line to the struct. Go will automatically install this tool if missing. | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
``` | ||
|
||
For example: | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
type UserService struct { | ||
baseService | ||
userRepository *repositories.UserRepository | ||
|
@@ -129,7 +129,7 @@ Don't worry about the imports, variable naming, and code style in the generated | |
It doesn't break the work of other people who don't have installed this tool in collaboration. Go will automatically install this tool if missing. | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
``` | ||
|
||
## Sponsoring | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,13 +55,13 @@ func NewUserService(baseService baseService, userRepository *repositories.UserRe | |
无需手动安装,只需要给结构体添加下面这行注释就行。Go 会在缺失时自动下载这个工具。 | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
``` | ||
|
||
比如这样: | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
type UserService struct { | ||
baseService | ||
userRepository *repositories.UserRepository | ||
|
@@ -129,7 +129,7 @@ func NewController(logger *zap.Logger, debug bool) *Controller { | |
就算其他同事没有安装这个工具,这么做也不会影响到他们的工作。因为 Go 会在必要时自动安装这个工具。 | ||
|
||
```go | ||
//go:generate go run github.com/Bin-Huang/[email protected].1 | ||
//go:generate go run github.com/Bin-Huang/[email protected].2 | ||
``` | ||
|
||
## 赞赏 | ||
|