Skip to content

Commit

Permalink
removed unused whoami handler
Browse files Browse the repository at this point in the history
  • Loading branch information
seanshahkarami committed May 10, 2023
1 parent 5e83049 commit e335ba4
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package main

import (
"flag"
"fmt"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -49,7 +48,6 @@ func main() {
// NOTE temporarily redirecting to sage docs. can change to something better later.
http.Handle("/", http.RedirectHandler("https://docs.waggle-edge.ai/docs/tutorials/accessing-data", http.StatusTemporaryRedirect))
http.Handle("/metrics", promhttp.Handler())
http.HandleFunc("/whoami", whoamiHandler)
http.Handle("/api/v1/query", querySvc)
http.Handle("/api/v0/stream", streamSvc)

Expand All @@ -60,15 +58,6 @@ func main() {
}
}

func whoamiHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "hello and thanks for visiting!\n\nhere's some info about your request!\n\n")

fmt.Fprintf(w, "headers:\n")
for k, v := range r.Header {
fmt.Fprintf(w, "%q: %q\n", k, v)
}
}

func getenv(key string, fallback string) string {
if s, ok := os.LookupEnv(key); ok {
return s
Expand Down

0 comments on commit e335ba4

Please sign in to comment.