MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / init

Function init

crypto/kms/pubkeystore.go:73–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

71)
72
73func init() {
74 //HACK(auxten) if we were running go test
75 if strings.HasSuffix(os.Args[0], ".test") ||
76 strings.HasSuffix(os.Args[0], ".test.exe") ||
77 strings.HasPrefix(filepath.Base(os.Args[0]), "___") {
78 _, testFile, _, _ := runtime.Caller(0)
79 confFile := filepath.Join(filepath.Dir(testFile), "config.yaml")
80 log.WithField("conf", confFile).Debug("current test filename")
81 log.Debugf("os.Args: %#v", os.Args)
82
83 var err error
84 conf.GConf, err = conf.LoadConfig(confFile)
85 if err != nil {
86 log.WithError(err).Fatal("load config for test in kms failed")
87 }
88 InitBP()
89 }
90}
91
92// InitBP initializes kms.BP struct with conf.GConf.
93func InitBP() {

Callers

nothing calls this directly

Calls 7

WithFieldFunction · 0.92
DebugfFunction · 0.92
LoadConfigFunction · 0.92
WithErrorFunction · 0.92
InitBPFunction · 0.85
DebugMethod · 0.80
FatalMethod · 0.80

Tested by

no test coverage detected