Skip to content

Commit

Permalink
readme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MustansirZia committed Dec 2, 2019
1 parent 2f34276 commit ee602de
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ GET http://localhost:5000/institutions?name=Kashmir&count=10
"KASHMIR LAW COLLEGE",
"KASHMIR COLLEGE OF EDUCATION, BARAMULLAH",
"Azad Jammu and Kashmir University",
...
...
// ...
// ...
]
```

Expand Down Expand Up @@ -86,16 +86,16 @@ This makes it fairly easy to add a new colleges and universities by adding anoth
Here's the `init` function inside `institutions/institutions_http_handler.go`.

```go
// institutions/institutions_http_handler.go file.
func init() {
repository = NewInstitutionRepository(
// Exisiting providers
providers.NewIndianCollegesProvider(),
providers.NewWorldUniversitiesProvider(),
providers.NewIndianUniversitiesProvider(),
// Add your own `InstitutionProvider` instance here.
)
}
// institutions/institutions_http_handler.go file.
func init() {
repository = NewInstitutionRepository(
// Exisiting providers
providers.NewIndianCollegesProvider(),
providers.NewWorldUniversitiesProvider(),
providers.NewIndianUniversitiesProvider(),
// Add your own `InstitutionProvider` instance here.
)
}
```

To faciliate additional JSON files a helper `jSONProvder` can be used. More on this inside `institutions/providers/json_provider.go`. All the three JSON files are loaded using this provider.
Expand Down

0 comments on commit ee602de

Please sign in to comment.