mirror of
				https://github.com/TeaOSLab/EdgeNode.git
				synced 2025-11-04 16:00:25 +08:00 
			
		
		
		
	
		
			
	
	
		
			22 lines
		
	
	
		
			278 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			22 lines
		
	
	
		
			278 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								package goman
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import (
							 | 
						||
| 
								 | 
							
									"testing"
							 | 
						||
| 
								 | 
							
									"time"
							 | 
						||
| 
								 | 
							
								)
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								func TestNew(t *testing.T) {
							 | 
						||
| 
								 | 
							
									New(func() {
							 | 
						||
| 
								 | 
							
										t.Log("Hello")
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
										t.Log(List())
							 | 
						||
| 
								 | 
							
									})
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									time.Sleep(1 * time.Second)
							 | 
						||
| 
								 | 
							
									t.Log(List())
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
									time.Sleep(1 * time.Second)
							 | 
						||
| 
								 | 
							
								}
							 |