Skip to content

Commit 588d312

Browse files
authored
Merge pull request #587 from kuba--/dbname
Set default db name (gitbase)
2 parents 356e7f1 + 8355f1b commit 588d312

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/gitbase/command/server.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ const (
3838
type Server struct {
3939
engine *sqle.Engine
4040
pool *gitbase.RepositoryPool
41-
name string
4241

42+
Name string `long:"db" default:"gitbase" description:"Database name"`
4343
Version string // Version of the application.
4444
Directories []string `short:"d" long:"directories" description:"Path where the git repositories are located (standard and siva), multiple directories can be defined. Accepts globs."`
4545
Depth int `long:"depth" default:"1000" description:"load repositories looking at less than <depth> nested subdirectories."`
@@ -187,8 +187,8 @@ func (c *Server) buildDatabase() error {
187187
return err
188188
}
189189

190-
c.engine.AddDatabase(gitbase.NewDatabase(c.name))
191-
logrus.WithField("db", c.name).Debug("registered database to catalog")
190+
c.engine.AddDatabase(gitbase.NewDatabase(c.Name))
191+
logrus.WithField("db", c.Name).Debug("registered database to catalog")
192192

193193
c.engine.Catalog.RegisterFunctions(function.Functions)
194194
logrus.Debug("registered all available functions in catalog")

0 commit comments

Comments
 (0)