diff --git a/main.go b/main.go index 4d4f5bf04c0fa76c6845994d6564cbe258c33bb8..e50c9e5038b02d8c829fb5652d2caffcd459a962 100644 --- a/main.go +++ b/main.go @@ -24,19 +24,23 @@ type CountryInfo struct { //Når du kjører koden blir du sendt til en hjemmeside siden forespørsel spesifikasjoner ikke er gitt enda - //info om hvordan bruke API for info path + //info om hvordan bruke API func homeHandler(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", "application/json") // Strukturert respons for bedre lesbarhet response := map[string]interface{}{ + "WELCOME": "Welcome to the Country Info API", "endpoints": map[string]interface{}{ "Endpoint 1": map[string]string{ "Description": "Get information about a country using its ISO 3166-1 alpha-2 code.", "URL": "http://localhost:8080/countryinfo/v1/info/{country_code}{?limit=10}", "Example": "http://localhost:8080/countryinfo/v1/info/NO", - "Endpoint 2" : "To ble implemented", }, - "WELCOME": "Welcome to the Country Info API", + "Endpoint 2": map[string]interface{}{ + "Description": "TO BE IMPLEMENTED", + + }, + }, }