Skip to content

Commit

Permalink
mirc: optimize go:generate cmd for generate template
Browse files Browse the repository at this point in the history
  • Loading branch information
alimy committed Jan 16, 2023
1 parent 2154fd9 commit cda8216
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/mirc/auto/api/site.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/mirc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "github.com/alimy/mir-example/v3/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/chi/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/echo/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/fiber-v2/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/fiber/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/gin/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/hertz/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/httprouter/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/iris/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/macaron/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/templates/mux/mirc/main.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
_ "{{ .PkgName }}/mirc/routes/v2"
)

//go:generate go run main.go
//go:generate go run $GOFILE
func main() {
log.Println("generate code start")
opts := Options{
Expand Down
2 changes: 1 addition & 1 deletion mirc/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
BuildTime = ""

// AppVer version of Mirc
AppVer = semver.MustParse("v3.0.0")
AppVer = semver.MustParse("v3.0.1")
)

func ShowInfo() string {
Expand Down

0 comments on commit cda8216

Please sign in to comment.