MCPcopy
hub / github.com/ddworken/hishtory / GetConf

Function GetConf

client/hctx/hctx.go:148–154  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

146}
147
148func GetConf(ctx context.Context) *ClientConfig {
149 v := ctx.Value(ConfigCtxKey)
150 if v != nil {
151 return (v.(*ClientConfig))
152 }
153 panic(fmt.Errorf("failed to find config in ctx"))
154}
155
156func GetDb(ctx context.Context) *gorm.DB {
157 v := ctx.Value(DbCtxKey)

Callers 15

TestCtxConfigIsReferenceFunction · 0.92
BenchmarkGetRowsFunction · 0.92
assertOnlineStatusFunction · 0.92
initialModelFunction · 0.92
runQueryAndUpdateTableFunction · 0.92
isExtraCompactHeightModeFunction · 0.92
isCompactHeightModeFunction · 0.92
renderNullableTableFunction · 0.92
getRowsFunction · 0.92
makeTableColumnsFunction · 0.92
getTableHeightFunction · 0.92

Calls 1

ValueMethod · 0.45

Tested by 7

TestCtxConfigIsReferenceFunction · 0.74
BenchmarkGetRowsFunction · 0.74
TestSetupFunction · 0.74
TestSetupOfflineFunction · 0.74