mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-01-24 03:29:05 +08:00
27 lines
548 B
Go
27 lines
548 B
Go
|
// Package global
|
||
|
// @Link https://github.com/bufanyun/hotgo
|
||
|
// @Copyright Copyright (c) 2023 HotGo CLI
|
||
|
// @Author Ms <133814250@qq.com>
|
||
|
// @License https://github.com/bufanyun/hotgo/blob/master/LICENSE
|
||
|
package global
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"hotgo/internal/library/addons"
|
||
|
)
|
||
|
|
||
|
func Init(ctx context.Context, sk *addons.Skeleton) {
|
||
|
skeleton = sk
|
||
|
}
|
||
|
|
||
|
func GetSkeleton() *addons.Skeleton {
|
||
|
if skeleton == nil {
|
||
|
panic("addon skeleton not initialized.")
|
||
|
}
|
||
|
return skeleton
|
||
|
}
|
||
|
|
||
|
func Tpl(tpl string) string {
|
||
|
return addons.Tpl(skeleton.Name, tpl)
|
||
|
}
|