You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
golog/gin_gorm_config.go

30 lines
744 B

package golog
import (
"context"
"go.dtapp.net/gorequest"
"runtime"
)
func (gg *GinGorm) setConfig(ctx context.Context, systemOutsideIp string) {
info := getSystem()
gg.config.systemHostname = info.SystemHostname
gg.config.systemOs = info.SystemOs
gg.config.systemVersion = info.SystemVersion
gg.config.systemKernel = info.SystemKernel
gg.config.systemKernelVersion = info.SystemKernelVersion
gg.config.systemBootTime = info.SystemBootTime
gg.config.cpuCores = info.CpuCores
gg.config.cpuModelName = info.CpuModelName
gg.config.cpuMhz = info.CpuMhz
gg.config.systemInsideIp = gorequest.GetInsideIp(ctx)
gg.config.systemOutsideIp = systemOutsideIp
gg.config.sdkVersion = Version
gg.config.goVersion = runtime.Version()
}