Skip to content

Commit

Permalink
add path arg to allow search over arbitrary directories
Browse files Browse the repository at this point in the history
  • Loading branch information
amlweems committed Jan 28, 2019
1 parent d24128c commit 0395924
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"crypto/x509"
"encoding/pem"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
Expand Down Expand Up @@ -131,10 +132,17 @@ func (n *Node) Print(indent int) {
}
}

var (
flagPath string
)

func main() {
flag.StringVar(&flagPath, "path", ".", "directory to search for certificates")
flag.Parse()

pool := NewCertPool()

err := filepath.Walk(".",
err := filepath.Walk(flagPath,
func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
Expand Down

0 comments on commit 0395924

Please sign in to comment.