You've already forked prometheus-fail2ban-exporter
							
							build: add project dockerfile (#2)
Add a project Dockerfile to allow deploying the application in a docker container. Add a `run.sh` script to start the application in the container. Add Makefile commands to build the docker image based on the Dockerfile. Fix possible nil reference error in the `db` package.
This commit is contained in:
		
							
								
								
									
										8
									
								
								db/db.go
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								db/db.go
									
									
									
									
									
								
							@@ -70,8 +70,10 @@ func (db *Fail2BanDB) RunJailNameToCountQuery(query string) (map[string]int, err
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (db *Fail2BanDB) mustCloseStatement(stmt *sql.Stmt) {
 | 
			
		||||
	err := stmt.Close()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatal(err)
 | 
			
		||||
	if stmt != nil {
 | 
			
		||||
		err := stmt.Close()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			log.Fatal(err)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user