Commit 643aa9d7 authored by Aksel Baardsen's avatar Aksel Baardsen
Browse files

renamed models to pkg

parent 075fea9a
package main
import (
"assignment-1/models"
"assignment-1/pkg"
"encoding/json"
"fmt"
"github.com/gorilla/mux"
......@@ -56,7 +56,7 @@ func cHandler(w http.ResponseWriter, r *http.Request) {
limit = "5"
}
country := models.GetCountryByCode(vars["country_identifier"], limit)
country := pkg.GetCountryByCode(vars["country_identifier"], limit)
c, _ := json.Marshal(country)
fmt.Fprintln(w, string(c))
......@@ -68,7 +68,7 @@ func sHandler(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
specie := models.GetSpecies(vars["speciesKey"])
specie := pkg.GetSpecies(vars["speciesKey"])
s, _ := json.Marshal(specie)
fmt.Fprintln(w, string(s))
......
package models
package pkg
import (
"encoding/json"
......
package models
package pkg
import (
"io/ioutil"
......
package models
package pkg
import (
"encoding/json"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment