MCPcopy Create free account
hub / github.com/kataras/iris / SetName

Method SetName

iris.go:205–215  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

203//
204// It returns this Application.
205func (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.

Callers 8

NewServerFunction · 0.45
mainFunction · 0.45
initFunction · 0.45
initFunction · 0.45
GetFunction · 0.45
TestSetHostFunction · 0.45
TestSwitchHostsFunction · 0.45
TestSwitchHostsRedirectFunction · 0.45

Calls

no outgoing calls

Tested by 3

TestSetHostFunction · 0.36
TestSwitchHostsFunction · 0.36
TestSwitchHostsRedirectFunction · 0.36