1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 04:47:02 +00:00

minor improvements

This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-07 01:56:42 +03:00
parent dceb09d4ff
commit f17a325df6
6 changed files with 122 additions and 49 deletions

View File

@@ -192,16 +192,8 @@ func MustGenerateConfiguration() (c Configuration) {
return
}
// LoadConfiguration reads a filename (fullpath)
// and returns a Configuration binded to the contents of the given filename.
// See Configuration.BindFile method too.
func LoadConfiguration(filename string) (c Configuration, err error) {
err = c.BindFile(filename)
return
}
// MustLoadConfiguration same as LoadConfiguration package-level function
// but it panics on errors.
// but it panics on error.
func MustLoadConfiguration(filename string) Configuration {
c, err := LoadConfiguration(filename)
if err != nil {
@@ -210,3 +202,11 @@ func MustLoadConfiguration(filename string) Configuration {
return c
}
// LoadConfiguration reads a filename (fullpath)
// and returns a Configuration binded to the contents of the given filename.
// See Configuration.BindFile method too.
func LoadConfiguration(filename string) (c Configuration, err error) {
err = c.BindFile(filename)
return
}