Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hartfordfive committed Oct 3, 2016
1 parent efbed0b commit b08d30e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,15 @@ func main() {
os.Exit(1)
}

fmt.Printf("Matches:\n----------------------------\n")
fmt.Println("Line\tPattern\n--------------------------------------------")
fmt.Println("Pattern Match?\t\tString\n--------------------------------------------")

totalFullMatches := 0

stackHead := new(Stack)
stackTail := new(Stack)

for _, line := range lines {

matches := regex.MatchString(line)
if *negate {
matches = !matches
Expand All @@ -124,7 +124,7 @@ func main() {

stackHead.Push(matches)

} else if stackHead.Len() == 1 {
} else {

// Check if the item to be pushed is the same as what's in the current head stack
// If so, then restet both stacks
Expand All @@ -144,7 +144,7 @@ func main() {
}
}

fmt.Printf("%v\t%v\n", matches, line)
fmt.Printf("%v\t\t%v\n", matches, line)

}

Expand Down
17 changes: 0 additions & 17 deletions teststring.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
"no queue 'bucket-1' in vhost '/'",
'queue.declare'}

=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
Expand All @@ -19,25 +18,9 @@ connection <0.23893.109>, channel 3 - soft error:

=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
"no queue 'bucket-1' in vhost '/'",
'queue.declare'}
=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
"no queue 'bucket-1' in vhost '/'",
'queue.declare'}
=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
"no queue 'bucket-1' in vhost '/'",
'queue.declare'}

=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
{amqp_error,not_found,
"no queue 'bucket-1' in vhost '/'",
'queue.declare'}

=ERROR REPORT==== 3-Feb-2016::03:10:32 ===
connection <0.23893.109>, channel 3 - soft error:
Expand Down

0 comments on commit b08d30e

Please sign in to comment.