Skip to content

Commit

Permalink
Merge pull request #938 from lulucas/master
Browse files Browse the repository at this point in the history
modelgen hook docs fixed
  • Loading branch information
vvakame committed Nov 25, 2019
2 parents 15b3058 + 63be1d5 commit e747d92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/recipes/modelgen-hook.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
)

// Defining mutation function
func mutateHook(b *ModelBuild) *ModelBuild {
func mutateHook(b *modelgen.ModelBuild) *modelgen.ModelBuild {
for _, model := range b.Models {
for _, field := range model.Fields {
field.Tag += ` orm_binding:"` + model.Name + `.` + field.Name + `"`
Expand All @@ -49,7 +49,7 @@ func main() {

err = api.Generate(cfg,
api.NoPlugins(),
api.AddPlugin(p),
api.AddPlugin(&p),
)
if err != nil {
fmt.Fprintln(os.Stderr, err.Error())
Expand Down

0 comments on commit e747d92

Please sign in to comment.