genmvc

command module
v0.0.0-...-df20c28 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

genmvc

golang mvc code-generator.

Install

git clone git@github.com:ychdesign/genmvc.git
cd genmvc
make install

Usage

exec genmvc in terminal we can get:

Usage of genmvc:
  -all
    	generate all. include bo、po、repostiroy、service and so on.
  -bo
    	generate models to bo entity.
  -fileTPLPath string
    	Path of the templates to generate code. (default "~/.genmvc/templates")
  -modelsPath string
    	Path of the models source code. (default "pkg/models")
  -outputPath string
    	Write all file to which directory (default "generated")
  -po
    	generate models to po entity.
  -repoVersion string
    	repository template version. (default "0.0.0")
  -repository
    	generate repository iface and implement.
  -service
    	generate service iface and implement.
  -svcVersion string
    	service template version. (default "0.0.0")
Examples
$ genmvc -all -modelsPath examples/models -outputPath examples/generated
$ go mod tidy

Output:

generate examples/generated/repositories/server.go
generate examples/generated/services/server.go
generate examples/generated/bo/server.go
generate examples/generated/po/server.go
$tree examples

examples/
├── generated
│   ├── bo
│   │   └── server.go
│   ├── po
│   │   └── server.go
│   ├── repositories
│   │   └── server.go
│   └── services
│       └── server.go
└── models
    └── server.go

6 directories, 5 files

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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