mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Fix type in unused constant name (#111)
* Write LDAP, SMTP, PAM, DLDAP back to all uppercase * Fix type in unused constant name * Other MixCased fixes * Complete MixerCasing of template constants * Re uppercase LTS and LDAPS suffixes * Uppercase JSON suffix in constant names * Proper case LoginNoType * Prefix unexported template path constants with "tpl"
This commit is contained in:
		
				
					committed by
					
						 Andrey Nering
						Andrey Nering
					
				
			
			
				
	
			
			
			
						parent
						
							c8c748aea6
						
					
				
				
					commit
					864d1b1f9f
				
			| @@ -28,12 +28,12 @@ var HookQueue = sync.NewUniqueQueue(setting.Webhook.QueueLength) | ||||
| type HookContentType int | ||||
|  | ||||
| const ( | ||||
| 	ContentTypeJson HookContentType = iota + 1 | ||||
| 	ContentTypeJSON HookContentType = iota + 1 | ||||
| 	ContentTypeForm | ||||
| ) | ||||
|  | ||||
| var hookContentTypes = map[string]HookContentType{ | ||||
| 	"json": ContentTypeJson, | ||||
| 	"json": ContentTypeJSON, | ||||
| 	"form": ContentTypeForm, | ||||
| } | ||||
|  | ||||
| @@ -44,7 +44,7 @@ func ToHookContentType(name string) HookContentType { | ||||
|  | ||||
| func (t HookContentType) Name() string { | ||||
| 	switch t { | ||||
| 	case ContentTypeJson: | ||||
| 	case ContentTypeJSON: | ||||
| 		return "json" | ||||
| 	case ContentTypeForm: | ||||
| 		return "form" | ||||
| @@ -511,7 +511,7 @@ func (t *HookTask) deliver() { | ||||
| 		SetTLSClientConfig(&tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify}) | ||||
|  | ||||
| 	switch t.ContentType { | ||||
| 	case ContentTypeJson: | ||||
| 	case ContentTypeJSON: | ||||
| 		req = req.Header("Content-Type", "application/json").Body(t.PayloadContent) | ||||
| 	case ContentTypeForm: | ||||
| 		req.Param("payload", t.PayloadContent) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user