test storesecret update
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -373,12 +373,14 @@ func UserGetSafesAllowed(userId int) ([]UserSafe, error) {
|
||||
defer rows.Close()
|
||||
|
||||
// Get columns from rows for debugging
|
||||
columns, err := rows.Columns()
|
||||
if err != nil {
|
||||
log.Printf("UserGetSafesAllowed error getting column listing : '%s'\n", err)
|
||||
return results, err
|
||||
}
|
||||
log.Printf("columns: %v\n", columns)
|
||||
/*
|
||||
columns, err := rows.Columns()
|
||||
if err != nil {
|
||||
log.Printf("UserGetSafesAllowed error getting column listing : '%s'\n", err)
|
||||
return results, err
|
||||
}
|
||||
log.Printf("columns: %v\n", columns)
|
||||
*/
|
||||
|
||||
// parse all the results into a slice
|
||||
for rows.Next() {
|
||||
@@ -394,23 +396,24 @@ func UserGetSafesAllowed(userId int) ([]UserSafe, error) {
|
||||
|
||||
results = append(results, us)
|
||||
|
||||
// Create a map to store column names and values
|
||||
rowValues := make(map[string]interface{})
|
||||
/*
|
||||
// Create a map to store column names and values
|
||||
rowValues := make(map[string]interface{})
|
||||
|
||||
// Scan each row into the map
|
||||
err := rows.MapScan(rowValues)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
|
||||
// Print the raw row record
|
||||
log.Println("-----------")
|
||||
for _, column := range columns {
|
||||
log.Printf("%s: %v\n", column, rowValues[column])
|
||||
}
|
||||
log.Println("-----------")
|
||||
// Scan each row into the map
|
||||
err := rows.MapScan(rowValues)
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
continue
|
||||
}
|
||||
|
||||
// Print the raw row record
|
||||
log.Println("-----------")
|
||||
for _, column := range columns {
|
||||
log.Printf("%s: %v\n", column, rowValues[column])
|
||||
}
|
||||
log.Println("-----------")
|
||||
*/
|
||||
}
|
||||
log.Printf("UserGetSafesAllowed retrieved '%d' results\n", len(results))
|
||||
}
|
||||
|
Reference in New Issue
Block a user