1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

README: update supporters

there are four more waiting for github username confirmation
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-18 19:02:20 +03:00
parent a491cdf7ef
commit e98fd21c83
3 changed files with 63 additions and 0 deletions

View File

@@ -123,6 +123,18 @@ func RegisterApplication(app Application) {
mu.Unlock()
}
// GetApplications returns a slice of all the registered Applications.
func GetApplications() []Application {
mu.RLock()
// a copy slice but the instances are pointers so be careful what modifications are done
// the return value is read-only but it can be casted to *iris.Application.
apps := make([]Application, 0, len(registeredApps))
copy(apps, registeredApps)
mu.RLock()
return apps
}
// LastApplication returns the last registered Application.
// Handlers has access to the current Application,
// use `Context.Application()` instead.