mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 20:22:25 -06:00 
			
		
		
		
	
		
			
	
	
		
			14 lines
		
	
	
	
		
			191 B
		
	
	
	
		
			Go
		
	
	
	
	
	
		
		
			
		
	
	
			14 lines
		
	
	
	
		
			191 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| 
								 | 
							
								package debug
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// DEBUG returns whether debugging is enabled.
							 | 
						||
| 
								 | 
							
								func DEBUG() bool {
							 | 
						||
| 
								 | 
							
									return debug
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								// Run will only call fn if DEBUG is enabled.
							 | 
						||
| 
								 | 
							
								func Run(fn func()) {
							 | 
						||
| 
								 | 
							
									if debug {
							 | 
						||
| 
								 | 
							
										fn()
							 | 
						||
| 
								 | 
							
									}
							 | 
						||
| 
								 | 
							
								}
							 |