Advertisement
Guest User

Go1

a guest
Jan 21st, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "log"
  6. "net/http"
  7.  
  8. "github.com/gorilla/mux"
  9. )
  10.  
  11. func myString(w http.ResponseWriter, r *http.Request) {
  12. data, err := ioutil.ReadFile("./output.json")
  13. jsonFile = { message : output.message }
  14. }
  15.  
  16. func main() {
  17. router := mux.NewRouter().StrictSlash(true)
  18. router.HandleFunc("/hello", myString)
  19. log.Fatal(http.ListenAndServe(":8080", router))
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement