mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-04 21:42:57 +02:00
Set service name as table name (#2780)
* add docs layout * update all to use _layouts * update the styling * always use service name as table name
This commit is contained in:
@@ -60,14 +60,11 @@ func (s *service) Init(opts ...Option) {
|
|||||||
s.opts.Logger.Log(log.FatalLevel, err)
|
s.opts.Logger.Log(log.FatalLevel, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the store has no Table set, fallback to the
|
// we might not want to do this
|
||||||
// services name
|
name := s.opts.Cmd.App().Name
|
||||||
if len(s.opts.Store.Options().Table) == 0 {
|
err := s.opts.Store.Init(store.Table(name))
|
||||||
name := s.opts.Cmd.App().Name
|
if err != nil {
|
||||||
err := s.opts.Store.Init(store.Table(name))
|
s.opts.Logger.Log(log.FatalLevel, err)
|
||||||
if err != nil {
|
|
||||||
s.opts.Logger.Log(log.FatalLevel, err)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user