remove extra debug statements
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:
@@ -158,17 +158,17 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
||||
log.Printf("SecretsGetAllowed any error '%s'\n", rows.Err())
|
||||
// parse all the results into a slice
|
||||
for rows.Next() {
|
||||
log.Printf("SecretsGetAllowed processing row\n")
|
||||
//log.Printf("SecretsGetAllowed processing row\n")
|
||||
var r UserSecret
|
||||
err = rows.StructScan(&r)
|
||||
log.Printf("SecretsGetAllowed performed struct scan\n")
|
||||
//log.Printf("SecretsGetAllowed performed struct scan\n")
|
||||
if err != nil {
|
||||
log.Printf("SecretsGetAllowed error parsing sql record : '%s'\n", err)
|
||||
return secretResults, err
|
||||
}
|
||||
log.Printf("r: %v\n", r)
|
||||
//log.Printf("r: %v\n", r)
|
||||
|
||||
log.Printf("SecretsGetAllowed performed err check\n")
|
||||
//log.Printf("SecretsGetAllowed performed err check\n")
|
||||
|
||||
// work around to get the UserId populated in the User field of the struct
|
||||
r.User.UserId = r.UserUserId
|
||||
@@ -177,7 +177,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
||||
debugPrint := utils.PrintStructContents(&r, 0)
|
||||
log.Println(debugPrint)
|
||||
|
||||
log.Printf("SecretsGetAllowed performed debug print\n")
|
||||
//log.Printf("SecretsGetAllowed performed debug print\n")
|
||||
|
||||
// Append the secrets to the query output, don't decrypt the secrets (we didn't SELECT them anyway)
|
||||
//secretResults = append(secretResults, r)
|
||||
@@ -187,7 +187,7 @@ func SecretsGetAllowed(s *Secret, userId int) ([]UserSecret, error) {
|
||||
// if there is already a secret with the same ID present
|
||||
secretResults = utils.AppendIfNotExists(secretResults, r)
|
||||
|
||||
log.Printf("SecretsGetAllowed added secret results\n")
|
||||
//log.Printf("SecretsGetAllowed added secret results\n")
|
||||
}
|
||||
log.Printf("SecretsGetAllowed retrieved '%d' results\n", len(secretResults))
|
||||
}
|
||||
|
@@ -72,7 +72,7 @@ func PrintStructContents(s interface{}, indentLevel int) string {
|
||||
case reflect.Struct:
|
||||
if fieldType.Type == reflect.TypeOf(time.Time{}) {
|
||||
// Handle time.Time field
|
||||
result.WriteString(fmt.Sprintf("%v\n", field.Interface().(time.Time).Format("2006-01-02 15:04:05")))
|
||||
result.WriteString(fmt.Sprintf("%v\n", field.Interface().(time.Time).Format("2006-12-24 15:04:05")))
|
||||
} else {
|
||||
result.WriteString("\n")
|
||||
result.WriteString(PrintStructContents(field.Interface(), indentLevel+1))
|
||||
|
Reference in New Issue
Block a user