ing
This commit is contained in:
parent
053ff9b2a2
commit
07821c7cae
|
@ -2,6 +2,7 @@ package rpc
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"reflect"
|
||||
"strings"
|
||||
|
@ -62,6 +63,7 @@ func (m *serviceMap) register(rcvr interface{}, name string) error {
|
|||
return fmt.Errorf("rpc: no service name for type %q",
|
||||
s.rcvrType.String())
|
||||
}
|
||||
log.Printf("The name of service is %s", s.name)
|
||||
// Setup methods.
|
||||
for i := 0; i < s.rcvrType.NumMethod(); i++ {
|
||||
method := s.rcvrType.Method(i)
|
||||
|
@ -101,6 +103,7 @@ func (m *serviceMap) register(rcvr interface{}, name string) error {
|
|||
argsType: args.Elem(),
|
||||
replyType: reply.Elem(),
|
||||
}
|
||||
log.Printf("The name of service[%s] method is %s", s.name, method.Name)
|
||||
}
|
||||
if len(s.methods) == 0 {
|
||||
return fmt.Errorf("rpc: %q has no exported methods of suitable type",
|
||||
|
|
Loading…
Reference in New Issue
Block a user