mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
change reflect.Type.Name() into two functions: Name() and PkgPath() for ease of use.
R=rsc DELTA=31 (8 added, 2 deleted, 21 changed) OCL=31778 CL=31792
This commit is contained in:
parent
db508ccbff
commit
ba0cf083a2
4 changed files with 27 additions and 21 deletions
|
|
@ -71,7 +71,7 @@ func (server *serverType) add(rcvr interface{}) os.Error {
|
|||
s := new(service);
|
||||
s.typ = reflect.Typeof(rcvr);
|
||||
s.rcvr = reflect.NewValue(rcvr);
|
||||
path_, sname := reflect.Indirect(s.rcvr).Type().Name();
|
||||
sname := reflect.Indirect(s.rcvr).Type().Name();
|
||||
if sname == "" {
|
||||
log.Exit("rpc: no service name for type", s.typ.String())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue