Skip to content

Commit

Permalink
follow consistency of separated test file
Browse files Browse the repository at this point in the history
  • Loading branch information
kandros committed Apr 26, 2019
1 parent 2ebd973 commit a8c09f9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions context/v1/context.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package context1

import (
"fmt"
"net/http"
)

// Store fetches data
type Store interface {
Fetch() string
}

// Server returns a handler for calling Store
func Server(store Store) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, store.Fetch())
}
}

0 comments on commit a8c09f9

Please sign in to comment.