Fixing some issues found by the linter
This commit is contained in:
		
							parent
							
								
									c54eccc625
								
							
						
					
					
						commit
						7a12b946a6
					
				
					 3 changed files with 8 additions and 3 deletions
				
			
		|  | @ -15,7 +15,7 @@ func main() { | ||||||
| 	conf, err := config.ReadConfigFromFile("config.toml") | 	conf, err := config.ReadConfigFromFile("config.toml") | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		conf = config.NewConfig() | 		conf = config.NewConfig() | ||||||
| 		conf.WriteConfigToFile("config.toml") | 		_ = conf.WriteConfigToFile("config.toml") | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	// Pretty print the current config | 	// Pretty print the current config | ||||||
|  |  | ||||||
|  | @ -104,6 +104,9 @@ func (d *Db) Migrate(dirname string) error { | ||||||
| 		log.Println("Executed SQL file:", file.Name()) | 		log.Println("Executed SQL file:", file.Name()) | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	tr.Commit() | 	if tr.Commit() != nil { | ||||||
|  | 		return err | ||||||
|  | 	} | ||||||
|  | 
 | ||||||
| 	return nil | 	return nil | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -36,7 +36,9 @@ func TestDbGetUserId(t *testing.T) { | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		t.Error("setupState failed:", err) | 		t.Error("setupState failed:", err) | ||||||
| 	} | 	} | ||||||
| 	db.AddUser("test", "password") | 	if db.AddUser("test", "password") != nil { | ||||||
|  | 		t.Error("AddUser failed") | ||||||
|  | 	} | ||||||
| 
 | 
 | ||||||
| 	var id int | 	var id int | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Imbus
						Imbus