mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
833 B
37 lines
833 B
2 years ago
|
// Copyright 2022 ROC. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
2 years ago
|
//go:build generate
|
||
|
// +build generate
|
||
|
|
||
2 years ago
|
package main
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
|
||
|
. "github.com/alimy/mir/v3/core"
|
||
|
. "github.com/alimy/mir/v3/engine"
|
||
|
|
||
2 years ago
|
_ "github.com/rocboss/paopao-ce/mirc/admin/v1"
|
||
|
_ "github.com/rocboss/paopao-ce/mirc/bot/v1"
|
||
|
_ "github.com/rocboss/paopao-ce/mirc/localoss/v1"
|
||
|
_ "github.com/rocboss/paopao-ce/mirc/space/v1"
|
||
2 years ago
|
_ "github.com/rocboss/paopao-ce/mirc/web/v1"
|
||
2 years ago
|
)
|
||
|
|
||
2 years ago
|
//go:generate go run $GOFILE
|
||
2 years ago
|
func main() {
|
||
|
log.Println("generate code start")
|
||
|
opts := Options{
|
||
2 years ago
|
RunMode(InSerialMode),
|
||
2 years ago
|
GeneratorName(GeneratorGin),
|
||
2 years ago
|
WatchCtxDone(true),
|
||
2 years ago
|
SinkPath("../auto"),
|
||
2 years ago
|
}
|
||
|
if err := Generate(opts); err != nil {
|
||
|
log.Fatal(err)
|
||
|
}
|
||
|
log.Println("generate code finish")
|
||
|
}
|