c5582275e7c71903a12d320e652c0380a0d69db6
				
			
			
		
	Use a go routine for the work logic. Here sleep and append to string. Inside the go routine, select for ctx.Done(). If happens, just stop and return. In the outside function, select for ctx.Done() too. If it happens, that means the work logic has not finished before canceled.
Learn Go with tests
Description
				
					Languages
				
				
								
								
									Go
								
								100%