Optimize code adjust (#2700)
* setFormMap error of result * adjust code for TrySet * error export for type multipart.FileHeader * code style adjust * reflect code maping optimize * Update form_mapping.go Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: thinkerou <thinkerou@gmail.com>
This commit is contained in:
		@ -46,9 +46,11 @@ type PureJSON struct {
 | 
			
		||||
	Data interface{}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var jsonContentType = []string{"application/json; charset=utf-8"}
 | 
			
		||||
var jsonpContentType = []string{"application/javascript; charset=utf-8"}
 | 
			
		||||
var jsonAsciiContentType = []string{"application/json"}
 | 
			
		||||
var (
 | 
			
		||||
	jsonContentType      = []string{"application/json; charset=utf-8"}
 | 
			
		||||
	jsonpContentType     = []string{"application/javascript; charset=utf-8"}
 | 
			
		||||
	jsonAsciiContentType = []string{"application/json"}
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Render (JSON) writes data with custom ContentType.
 | 
			
		||||
func (r JSON) Render(w http.ResponseWriter) (err error) {
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user