select fot struct
This commit is contained in:
		
							
								
								
									
										2
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								main.go
									
									
									
									
									
								
							@@ -125,7 +125,7 @@ func Get(username string) (*UserData, bool) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	u := NewUser()
 | 
						u := NewUser()
 | 
				
			||||||
	q := fmt.Sprintf("select username, password, id from %s_auth where username=?", c.TablePrefix)
 | 
						q := fmt.Sprintf("select username, password, id from %s_auth where username=?", c.TablePrefix)
 | 
				
			||||||
	err := c.db.Get(&u, q, username)
 | 
						err := c.db.Select(&u, q, username)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		if err == sql.ErrNoRows {
 | 
							if err == sql.ErrNoRows {
 | 
				
			||||||
			return nil, false
 | 
								return nil, false
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user