mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-10-31 10:37:24 -04:00 
			
		
		
		
	Add Event Hook plugins to DescribePlugins function (#1540)
* Add Event Hook plugins to DescribePlugins function * Update plugins.go * Update plugins.go
This commit is contained in:
		
							parent
							
								
									da674fd599
								
							
						
					
					
						commit
						6cabc9bfe3
					
				| @ -53,6 +53,14 @@ func DescribePlugins() string { | |||||||
| 		str += "  " + defaultCaddyfileLoader.name + "\n" | 		str += "  " + defaultCaddyfileLoader.name + "\n" | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  | 	if len(eventHooks) > 0 { | ||||||
|  | 		// List the event hook plugins | ||||||
|  | 		str += "\nEvent hook plugins:\n" | ||||||
|  | 		for hookPlugin := range eventHooks { | ||||||
|  | 			str += "  hook." + hookPlugin + "\n" | ||||||
|  | 		} | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	// Let's alphabetize the rest of these... | 	// Let's alphabetize the rest of these... | ||||||
| 	var others []string | 	var others []string | ||||||
| 	for stype, stypePlugins := range plugins { | 	for stype, stypePlugins := range plugins { | ||||||
| @ -65,6 +73,7 @@ func DescribePlugins() string { | |||||||
| 			others = append(others, s) | 			others = append(others, s) | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 
 | ||||||
| 	sort.Strings(others) | 	sort.Strings(others) | ||||||
| 	str += "\nOther plugins:\n" | 	str += "\nOther plugins:\n" | ||||||
| 	for _, name := range others { | 	for _, name := range others { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user