mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			17 lines
		
	
	
		
			213 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			213 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package events
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import "testing"
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestOn(t *testing.T) {
							 | 
						||
| 
								 | 
							
									On("hello", func() {
							 | 
						||
| 
								 | 
							
										t.Log("world")
							 | 
						||
| 
								 | 
							
									})
							 | 
						||
| 
								 | 
							
									On("hello", func() {
							 | 
						||
| 
								 | 
							
										t.Log("world2")
							 | 
						||
| 
								 | 
							
									})
							 | 
						||
| 
								 | 
							
									On("hello2", func() {
							 | 
						||
| 
								 | 
							
										t.Log("world2")
							 | 
						||
| 
								 | 
							
									})
							 | 
						||
| 
								 | 
							
									Notify("hello")
							 | 
						||
| 
								 | 
							
								}
							 |