Răsfoiți Sursa

Change redacted behaviour on the line information

The line information sometimes contains useful context information so
instead of redacting the whole line, this change redacts only the
secret
Cristhian Amaya 7 ani în urmă
părinte
comite
949029ca89
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      main.go

+ 1 - 1
main.go

@@ -669,7 +669,7 @@ func addLeak(leaks []Leak, line string, offender string, leakType string, diff g
 	}
 	}
 	if opts.Redact {
 	if opts.Redact {
 		leak.Offender = "REDACTED"
 		leak.Offender = "REDACTED"
-		leak.Line = "REDACTED"
+		leak.Line = strings.Replace(line, offender, "REDACTED", -1)
 	}
 	}
 
 
 	if opts.Verbose {
 	if opts.Verbose {