git » gofer » commit d5eb1fe

Eliminate dead code

author Alberto Bertogli
2020-06-13 03:08:39 UTC
committer Alberto Bertogli
2020-06-13 12:14:28 UTC
parent aa387f6e4e546a822b657a69cb69d1fe9e57691b

Eliminate dead code

This patch removes some unused functions which were accidentally left
over from previous changes.

server/http.go +0 -9
trace/trace.go +0 -8

diff --git a/server/http.go b/server/http.go
index 6aad341..4a060ea 100644
--- a/server/http.go
+++ b/server/http.go
@@ -219,15 +219,6 @@ func adjustPath(req string, from string, to string) string {
 	return dst
 }
 
-func pathOrOpaque(u url.URL) string {
-	if u.Path != "" {
-		return u.Path
-	}
-
-	// This happens for relative paths, which are fine in this context.
-	return u.Opaque
-}
-
 func makeDir(path string, dir string, opts config.DirOpts) http.Handler {
 	fs := http.FileServer(NewFS(http.Dir(dir), opts))
 
diff --git a/trace/trace.go b/trace/trace.go
index 0adcee9..cac9837 100644
--- a/trace/trace.go
+++ b/trace/trace.go
@@ -120,14 +120,6 @@ func (e *EventLog) Printf(format string, a ...interface{}) {
 		fmt.Sprintf(format, a...))
 }
 
-// Debugf adds the message to the EventLog, with a debugging level.
-func (e *EventLog) Debugf(format string, a ...interface{}) {
-	e.e.Printf(format, a...)
-
-	log.Log(log.Debug, 1, "%#p %s %s: %s", e, e.family, e.title,
-		fmt.Sprintf(format, a...))
-}
-
 // Errorf adds the message to the EventLog, with an error level.
 func (e *EventLog) Errorf(format string, a ...interface{}) error {
 	err := fmt.Errorf(format, a...)