mirror of
				https://github.com/dancojocaru2000/CfrTrainInfoTelegramBot.git
				synced 2025-11-04 08:56:39 +02:00 
			
		
		
		
	Fix bug regarding trailing whitespace in token
This commit is contained in:
		
							parent
							
								
									b44f1c92d2
								
							
						
					
					
						commit
						faa17a12d6
					
				
					 1 changed files with 1 additions and 0 deletions
				
			
		
							
								
								
									
										1
									
								
								main.go
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								main.go
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -54,6 +54,7 @@ func main() {
 | 
			
		|||
	log.SetOutput(os.Stderr)
 | 
			
		||||
 | 
			
		||||
	botToken := os.Getenv("CFR_BOT.TOKEN")
 | 
			
		||||
	botToken = strings.TrimSpace(botToken)
 | 
			
		||||
	if len(botToken) == 0 {
 | 
			
		||||
		log.Fatal("ERROR: No bot token supplied; supply with CFR_BOT.TOKEN")
 | 
			
		||||
	}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue