MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / Get

Function Get

internal/config/serverNameExample.go:20–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

18}
19
20func Get() *Config {
21 if config == nil {
22 panic("config is nil, please call config.Init() first")
23 }
24 return config
25}
26
27func Set(conf *Config) {
28 config = conf

Callers 15

InitSqliteFunction · 0.92
GetCacheTypeFunction · 0.92
InitRedisFunction · 0.92
InitDBFunction · 0.92
TestGetDBFunction · 0.92
TestInitMysqlErrorFunction · 0.92
TestInitPostgresqlErrorFunction · 0.92
TestInitRedisFunction · 0.92
InitMysqlFunction · 0.92
InitPostgresqlFunction · 0.92
getGRPCClientCfgFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestGetDBFunction · 0.74
TestInitMysqlErrorFunction · 0.74
TestInitPostgresqlErrorFunction · 0.74
TestInitRedisFunction · 0.74
getGRPCClientCfgFunction · 0.74
TestGRPCServerFunction · 0.74
TestGRPCServerMockFunction · 0.74
TestHTTPServerFunction · 0.74
TestHTTPServerMockFunction · 0.74
TestNewRouter_pbExampleFunction · 0.74