MCPcopy
hub / github.com/deepfence/SecretScanner / GetSession

Function GetSession

core/session.go:41–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39}
40
41func GetSession() *Session {
42 sessionSync.Do(func() {
43 session = &Session{
44 Context: context.Background(),
45 }
46
47 if session.Options, err = ParseOptions(); err != nil {
48 log.Error().Err(err).Msg("failed to parse options")
49 os.Exit(1)
50 }
51
52 if session.ExtractorConfig, err = loadExtractorConfigFile(session.Options); err != nil {
53 log.Error().Err(err).Msg("failed to load extractor config")
54 os.Exit(1)
55 }
56
57 session.Start()
58 })
59
60 return session
61}

Callers 2

main.goFile · 0.92
mainFunction · 0.92

Calls 3

ParseOptionsFunction · 0.85
loadExtractorConfigFileFunction · 0.85
StartMethod · 0.80

Tested by

no test coverage detected