Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

Commit

Permalink
Remove app dependency from fixture app
Browse files Browse the repository at this point in the history
  • Loading branch information
sclevine committed Sep 27, 2017
1 parent 740bed3 commit 61447ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions fixtures/go-app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import (
"net/http"
"os"
"strings"

"github.com/sclevine/cflocal/service"
)

type vcapService struct {
Name string `json:"name"`
Credentials map[string]interface{} `json:"credentials"`
}

func main() {
contents, err := ioutil.ReadFile("file")
if err != nil {
Expand All @@ -32,7 +35,7 @@ func main() {
})

http.HandleFunc("/services", func(w http.ResponseWriter, r *http.Request) {
vcapServices := map[string][]service.Service{}
vcapServices := map[string][]vcapService{}
if err := json.Unmarshal([]byte(os.Getenv("VCAP_SERVICES")), &vcapServices); err != nil {
w.WriteHeader(http.StatusInternalServerError)
fmt.Fprintf(w, "%s\n", err)
Expand Down

0 comments on commit 61447ec

Please sign in to comment.