创建应用
应用的文件系统
App (root)
├─ main.go
└─ app.yml
配置
hello:
message: "hello langgo"
创建应用
使用 langgo.Run() 方法调用组件创建应用。
package main
import (
"fmt"
"github.com/langwan/langgo"
"github.com/langwan/langgo/components/hello"
)
func main() {
langgo.Run(&hello.Instance{})
fmt.Println(hello.Get().Message)
}
hello langgo
Last updated