Switch that back to Fatal since we've added the convenience method

This commit is contained in:
Asim Aslam 2017-05-12 15:14:54 +01:00
parent bab586b71e
commit 5bce20627f

View File

@ -169,8 +169,7 @@ func (server *server) register(rcvr interface{}) error {
s.rcvr = reflect.ValueOf(rcvr)
sname := reflect.Indirect(s.rcvr).Type().Name()
if sname == "" {
log.Log("rpc: no service name for type", s.typ.String())
return errors.New("rpc: no service name for type" + s.typ.String())
log.Fatal("rpc: no service name for type", s.typ.String())
}
if !isExported(sname) {
s := "rpc Register: type " + sname + " is not exported"