From 3e3c0d89af165f36f96a655d85f21846c6194ff8 Mon Sep 17 00:00:00 2001 From: Minh Doan Date: Thu, 13 Dec 2018 15:10:09 -0800 Subject: [PATCH] clean something up --- services/explorer/service.go | 39 ------------------------------------ 1 file changed, 39 deletions(-) diff --git a/services/explorer/service.go b/services/explorer/service.go index 18fd66c3d..954ae0509 100644 --- a/services/explorer/service.go +++ b/services/explorer/service.go @@ -59,42 +59,3 @@ func (s *Service) GetExplorerBlock(w http.ResponseWriter, r *http.Request) { func (s *Service) GetExplorerAddress(w http.ResponseWriter, r *http.Request) { json.NewEncoder(w).Encode(s.data.Address) } - -// // GetPersonEndpoint is the specific person end point. -// func (s *Service) GetPersonEndpoint(w http.ResponseWriter, r *http.Request) { -// params := mux.Vars(r) -// for _, item := range s.people { -// if item.ID == params["id"] { -// json.NewEncoder(w).Encode(item) -// return -// } -// } -// json.NewEncoder(w).Encode(&Person{}) -// } - -// // GetPeopleEndpoint is the people end point. -// func (s *Service) GetPeopleEndpoint(w http.ResponseWriter, r *http.Request) { -// json.NewEncoder(w).Encode(s.people) -// } - -// // CreatePersonEndpoint is post people/{id} end point. -// func (s *Service) CreatePersonEndpoint(w http.ResponseWriter, r *http.Request) { -// params := mux.Vars(r) -// var person Person -// _ = json.NewDecoder(r.Body).Decode(&person) -// person.ID = params["id"] -// s.people = append(s.people, person) -// json.NewEncoder(w).Encode(s.people) -// } - -// // DeletePersonEndpoint is delete people/{id} end point. -// func (s *Service) DeletePersonEndpoint(w http.ResponseWriter, r *http.Request) { -// params := mux.Vars(r) -// for index, item := range s.people { -// if item.ID == params["id"] { -// s.people = append(s.people[:index], s.people[index+1:]...) -// break -// } -// json.NewEncoder(w).Encode(s.people) -// } -// }