mirror of
https://github.com/projectdiscovery/nuclei.git
synced 2025-12-18 12:25:28 +00:00
parent
a2c8f1e4cd
commit
3c825e8045
@ -13,10 +13,6 @@ type variables = map[string]any
|
|||||||
|
|
||||||
// DumpVariables dumps the variables in a pretty format
|
// DumpVariables dumps the variables in a pretty format
|
||||||
func DumpVariables(data variables) string {
|
func DumpVariables(data variables) string {
|
||||||
if !EnableVarDump {
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
d := godump.Dumper{
|
d := godump.Dumper{
|
||||||
Indentation: " ",
|
Indentation: " ",
|
||||||
HidePrivateFields: false,
|
HidePrivateFields: false,
|
||||||
|
|||||||
@ -34,10 +34,6 @@ func TestDumpVariables(t *testing.T) {
|
|||||||
assert.Contains(t, result, "b")
|
assert.Contains(t, result, "b")
|
||||||
assert.Contains(t, result, "c")
|
assert.Contains(t, result, "c")
|
||||||
|
|
||||||
// Test with EnableVarDump set to false
|
|
||||||
EnableVarDump = false
|
|
||||||
result = DumpVariables(testVars)
|
|
||||||
assert.Empty(t, result)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestProcess(t *testing.T) {
|
func TestProcess(t *testing.T) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user