Explorar el Código

Merge pull request #158 from camaya/redact-only-secret-on-line

Change redacted behaviour on the line information
Zachary Rice hace 7 años
padre
commit
b902d7310a
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 {
 		leak.Offender = "REDACTED"
-		leak.Line = "REDACTED"
+		leak.Line = strings.Replace(line, offender, "REDACTED", -1)
 	}
 
 	if opts.Verbose {