SetName sets a unique name to this Iris Application. It sets a child prefix for the current Application's Logger. Look `String` method too. It returns this Application.
(appName string)
| 203 | // |
| 204 | // It returns this Application. |
| 205 | func (app *Application) SetName(appName string) *Application { |
| 206 | app.mu.Lock() |
| 207 | defer app.mu.Unlock() |
| 208 | |
| 209 | if app.name == "" { |
| 210 | app.logger.SetChildPrefix(appName) |
| 211 | } |
| 212 | app.name = appName |
| 213 | |
| 214 | return app |
| 215 | } |
| 216 | |
| 217 | // String completes the fmt.Stringer interface and it returns |
| 218 | // the application's name. |
no outgoing calls