diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-04-01 16:51:56 +0200 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-04-01 16:51:56 +0200 |
commit | a92efb481fde20bdd25e9133f7f130fa85231aff (patch) | |
tree | 90ba2a852e6581cf73e1ede46f654e05c2357788 | |
parent | 7396bdc3b4745108760282890d0ae1c985865d69 (diff) |
Update rpc.Del
-rw-r--r-- | rpc.go | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -12,7 +12,7 @@ var ( ErrNoCert = errors.New("Certificate and Key are required") ) -const PRCPort = ":8000" +const RPCPort = ":8000" type GoXY struct { server *Server @@ -67,7 +67,11 @@ func (s *GoXY) Add(e Entry, _ *struct{}) error { // Del removes a route func (s *GoXY) Del(host string, _ *struct{}) error { - delete(s.server.Route, host) + h, err := url.Parse(host) + if err != nil { + return err + } + delete(s.server.Route, h.Host) s.server.Save(s.server.DataFile) return s.server.Update() } |