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.
paopao-ce/mirc/gen.go

31 lines
617 B

// 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.
//go:build generate
// +build generate
package main
import (
"log"
. "github.com/alimy/mir/v5/core"
. "github.com/alimy/mir/v5/engine"
)
//go:generate go run $GOFILE
func main() {
log.Println("[Mir] generate code start")
if err := Generate(
UseGin(),
Schema("web", "space", "localoss", "bot", "admin"),
SinkPath("../auto"),
WatchCtxDone(true),
RunMode(InSerialMode),
); err != nil {
log.Fatal(err)
}
log.Println("[Mir] generate code finish")
}