24 lines
590 B
Go
24 lines
590 B
Go
package cpdaily
|
|
|
|
import (
|
|
"context"
|
|
"likedream-goframe/internal/common/cst"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type Info struct {
|
|
AppVersion string `json:"appVersion"`
|
|
SystemVersion string `json:"systemVersion"`
|
|
CalVersion string `json:"calVersion"`
|
|
}
|
|
|
|
func GetInfo(ctx context.Context) *Info {
|
|
cfg := g.Config()
|
|
return &Info{
|
|
AppVersion: cfg.MustGetWithEnv(ctx, cst.ConfigCpdailyAppVersion).String(),
|
|
SystemVersion: cfg.MustGetWithEnv(ctx, cst.ConfigCpdailySystemVersion).String(),
|
|
CalVersion: cfg.MustGetWithEnv(ctx, cst.ConfigCpdailyCalVersion).String(),
|
|
}
|
|
}
|