github.com/gogf/gf@v1.16.9/net/ghttp/ghttp_server_config_mess.go (about) 1 // Copyright GoFrame Author(https://goframe.org). All Rights Reserved. 2 // 3 // This Source Code Form is subject to the terms of the MIT License. 4 // If a copy of the MIT was not distributed with this file, 5 // You can obtain one at https://github.com/gogf/gf. 6 7 package ghttp 8 9 // SetNameToUriType sets the NameToUriType for server. 10 func (s *Server) SetNameToUriType(t int) { 11 s.config.NameToUriType = t 12 } 13 14 // SetDumpRouterMap sets the DumpRouterMap for server. 15 // If DumpRouterMap is enabled, it automatically dumps the route map when server starts. 16 func (s *Server) SetDumpRouterMap(enabled bool) { 17 s.config.DumpRouterMap = enabled 18 } 19 20 // SetClientMaxBodySize sets the ClientMaxBodySize for server. 21 func (s *Server) SetClientMaxBodySize(maxSize int64) { 22 s.config.ClientMaxBodySize = maxSize 23 } 24 25 // SetFormParsingMemory sets the FormParsingMemory for server. 26 func (s *Server) SetFormParsingMemory(maxMemory int64) { 27 s.config.FormParsingMemory = maxMemory 28 }