framework1/framework/command/help.go

19 lines
460 B
Go
Raw Normal View History

2024-10-19 22:02:19 +08:00
package command
import (
"fmt"
"github.com/Superdanda/hade/framework/cobra"
"github.com/Superdanda/hade/framework/contract"
)
// helpCommand show current envionment
var DemoCommand = &cobra.Command{
Use: "demo",
Short: "demo for framework",
Run: func(c *cobra.Command, args []string) {
container := c.GetContainer()
appService := container.MustMake(contract.AppKey).(contract.App)
fmt.Println("app base folder:", appService.BaseFolder())
},
}