HTRACE-149. htraced: remove unused resource/ directory (cmccabe)
diff --git a/htrace-core/src/go/gobuild.sh b/htrace-core/src/go/gobuild.sh
index 40cb4bf..1a4e5f1 100755
--- a/htrace-core/src/go/gobuild.sh
+++ b/htrace-core/src/go/gobuild.sh
@@ -80,8 +80,6 @@
 case $ACTION in
 clean)
     rm -rf -- "${GOBIN}" ${SCRIPT_DIR}/pkg
-    find "${SCRIPT_DIR}/src/org/apache/htrace/resource" ! -name 'catalog.go' \
-        -type f -exec rm -f {} +
     ;;
 install)
     # Ensure that we have the godep program.
diff --git a/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go b/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
index c113a90..978862a 100644
--- a/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
+++ b/htrace-core/src/go/src/org/apache/htrace/htraced/rest.go
@@ -25,12 +25,10 @@
 	"fmt"
 	"github.com/gorilla/mux"
 	"io"
-	"mime"
 	"net"
 	"net/http"
 	"org/apache/htrace/common"
 	"org/apache/htrace/conf"
-	"org/apache/htrace/resource"
 	"os"
 	"path/filepath"
 	"strconv"
@@ -226,29 +224,6 @@
 	w.Write(jbytes)
 }
 
-type defaultServeHandler struct {
-	lg *common.Logger
-}
-
-func (hand *defaultServeHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
-	ident := strings.TrimLeft(req.URL.Path, "/")
-	if ident == "" {
-		ident = "index.html" // default to index.html
-	}
-	ident = strings.Replace(ident, "/", "__", -1)
-	hand.lg.Debugf("defaultServeHandler(path=%s, ident=%s)\n", req.URL.Path, ident)
-	rsc := resource.Catalog[ident]
-	if rsc == "" {
-		hand.lg.Warnf("failed to find entry for %s\n", ident)
-		w.WriteHeader(http.StatusNotFound)
-		return
-	}
-	file_ext := filepath.Ext(req.URL.Path)
-	mime_type := mime.TypeByExtension(file_ext)
-	w.Header().Set("Content-Type", mime_type)
-	w.Write([]byte(rsc))
-}
-
 type logErrorHandler struct {
 	lg *common.Logger
 }
diff --git a/htrace-core/src/go/src/org/apache/htrace/resource/catalog.go b/htrace-core/src/go/src/org/apache/htrace/resource/catalog.go
deleted file mode 100644
index 5b71f88..0000000
--- a/htrace-core/src/go/src/org/apache/htrace/resource/catalog.go
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package resource
-
-// Map containing all resources.
-var Catalog map[string]string = make(map[string]string)
-
-// Function called by generated code to add a resource to the catalog.
-func addResource(key, val string) string {
-	Catalog[key] = val
-	return key
-}