-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cmd/gf): add interface functions generating for embedded struct …
…of logic struct in command `gen service` (#3802)
- Loading branch information
Showing
13 changed files
with
436 additions
and
9 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
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
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
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
17 changes: 17 additions & 0 deletions
17
cmd/gf/internal/cmd/testdata/genservice/logic/base/base.go
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package base | ||
|
||
type Base = sBase | ||
|
||
type sBase struct { | ||
baseDestory `gen:"extend"` | ||
} | ||
|
||
// sBase Init | ||
func (*sBase) Init() { | ||
|
||
} | ||
|
||
// sBase Destory | ||
func (*sBase) Destory() { | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
cmd/gf/internal/cmd/testdata/genservice/logic/base/base_destory.go
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package base | ||
|
||
type baseDestory struct{} | ||
|
||
// baseDestory Destory | ||
func (baseDestory) Destory() { | ||
|
||
} | ||
|
||
// baseDestory BeforeDestory | ||
func (baseDestory) BeforeDestory() { | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
cmd/gf/internal/cmd/testdata/genservice/logic/base/sub/sub.go
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package sub | ||
|
||
type SubBase struct { | ||
} | ||
|
||
// subbase init | ||
func (*SubBase) Init() { | ||
|
||
} | ||
|
||
// subbase GetSubBase | ||
func (*SubBase) GetSubBase() { | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.