style: 系统信息any类型声明
This commit is contained in:
@@ -6,7 +6,7 @@ type ISystemInfo interface {
|
|||||||
SystemInfo() map[string]any
|
SystemInfo() map[string]any
|
||||||
|
|
||||||
// TimeInfo 系统时间信息
|
// TimeInfo 系统时间信息
|
||||||
TimeInfo() map[string]any
|
TimeInfo() map[string]string
|
||||||
|
|
||||||
// MemoryInfo 内存信息
|
// MemoryInfo 内存信息
|
||||||
MemoryInfo() map[string]any
|
MemoryInfo() map[string]any
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ func (s *SystemInfoImpl) SystemInfo() map[string]any {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TimeInfo 系统时间信息
|
// TimeInfo 系统时间信息
|
||||||
func (s *SystemInfoImpl) TimeInfo() map[string]any {
|
func (s *SystemInfoImpl) TimeInfo() map[string]string {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
// 获取当前时间
|
// 获取当前时间
|
||||||
current := now.Format("2006-01-02 15:04:05")
|
current := now.Format("2006-01-02 15:04:05")
|
||||||
@@ -58,7 +58,7 @@ func (s *SystemInfoImpl) TimeInfo() map[string]any {
|
|||||||
// 获取时区名称
|
// 获取时区名称
|
||||||
timezoneName := now.Format("MST")
|
timezoneName := now.Format("MST")
|
||||||
|
|
||||||
return map[string]any{
|
return map[string]string{
|
||||||
"current": current,
|
"current": current,
|
||||||
"timezone": timezone,
|
"timezone": timezone,
|
||||||
"timezoneName": timezoneName,
|
"timezoneName": timezoneName,
|
||||||
|
|||||||
Reference in New Issue
Block a user