Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f681f0bb17 |
@@ -108,14 +108,11 @@ func (s *Service) Gateway(grpcAddr string, httpAddr string) {
|
||||
http.ListenAndServe(httpAddr, s.Opts.GatewayMux)
|
||||
}
|
||||
|
||||
func (s *Service) Use(initFunc *func() error) {
|
||||
// Execute the Init function if it's not nil
|
||||
if initFunc != nil {
|
||||
err := (*initFunc)()
|
||||
if err != nil {
|
||||
print.Error(err.Error())
|
||||
panic(err)
|
||||
}
|
||||
func (s *Service) Use(initFunc func() error) {
|
||||
err := (initFunc)()
|
||||
if err != nil {
|
||||
print.Error(err.Error())
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user