mirror of
				https://github.com/go-micro/go-micro.git
				synced 2025-10-30 23:27:41 +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) | ||||
| 		} | ||||
|  | ||||
| 		// If the store has no Table set, fallback to the | ||||
| 		// services name | ||||
| 		if len(s.opts.Store.Options().Table) == 0 { | ||||
| 			name := s.opts.Cmd.App().Name | ||||
| 			err := s.opts.Store.Init(store.Table(name)) | ||||
| 			if err != nil { | ||||
| 				s.opts.Logger.Log(log.FatalLevel, err) | ||||
| 			} | ||||
| 		// we might not want to do this | ||||
| 		name := s.opts.Cmd.App().Name | ||||
| 		err := s.opts.Store.Init(store.Table(name)) | ||||
| 		if err != nil { | ||||
| 			s.opts.Logger.Log(log.FatalLevel, err) | ||||
| 		} | ||||
| 	}) | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user