startupProcess Is the method which executes all the necessary processes just before the start of the server.
()
| 1652 | |
| 1653 | // startupProcess Is the method which executes all the necessary processes just before the start of the server. |
| 1654 | func (app *App) startupProcess() { |
| 1655 | app.mutex.Lock() |
| 1656 | defer app.mutex.Unlock() |
| 1657 | |
| 1658 | app.ensureAutoHeadRoutesLocked() |
| 1659 | for prefix, subApp := range app.mountFields.appList { |
| 1660 | if prefix == "" { |
| 1661 | continue |
| 1662 | } |
| 1663 | subApp.ensureAutoHeadRoutes() |
| 1664 | } |
| 1665 | app.mountStartupProcess() |
| 1666 | |
| 1667 | // build route tree stack |
| 1668 | app.buildTree() |
| 1669 | } |
| 1670 | |
| 1671 | // Run onListen hooks. If they return an error, panic. |
| 1672 | func (app *App) runOnListenHooks(listenData *ListenData) { |