1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-12 22:07:47 +02:00

Update the way flags are used

This commit is contained in:
Asim
2016-01-02 19:12:17 +00:00
parent 1f1bc27421
commit 3b56a62589
9 changed files with 66 additions and 35 deletions

View File

@ -105,12 +105,13 @@ func (s *rpcServer) Options() Options {
return opts
}
func (s *rpcServer) Init(opts ...Option) {
func (s *rpcServer) Init(opts ...Option) error {
s.Lock()
for _, opt := range opts {
opt(&s.opts)
}
s.Unlock()
return nil
}
func (s *rpcServer) NewHandler(h interface{}) Handler {