mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-12 02:41:49 +02:00
Add Gist code search (#194)
This commit is contained in:
@ -7,6 +7,7 @@ import (
|
||||
"github.com/thomiceli/opengist/internal/config"
|
||||
"github.com/thomiceli/opengist/internal/db"
|
||||
"github.com/thomiceli/opengist/internal/git"
|
||||
"github.com/thomiceli/opengist/internal/index"
|
||||
"github.com/thomiceli/opengist/internal/memdb"
|
||||
"github.com/thomiceli/opengist/internal/ssh"
|
||||
"github.com/thomiceli/opengist/internal/web"
|
||||
@ -59,6 +60,13 @@ func initialize() {
|
||||
if err := memdb.Setup(); err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to initialize in memory database")
|
||||
}
|
||||
|
||||
if config.C.IndexEnabled {
|
||||
log.Info().Msg("Index directory: " + filepath.Join(homePath, config.C.IndexDirname))
|
||||
if err := index.Open(filepath.Join(homePath, config.C.IndexDirname)); err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to open index")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Reference in New Issue
Block a user