@@ -25,10 +25,8 @@ import (
2525 "github.com/lanrat/certgraph/web"
2626)
2727
28- // version vars
2928var (
30- gitDate = "none"
31- gitHash = "master"
29+ version = "dev"
3230 certGraph = graph .NewCertGraph ()
3331)
3432
@@ -101,7 +99,7 @@ func main() {
10199
102100 // check for version flag
103101 if config .printVersion {
104- fmt .Println (version ())
102+ fmt .Println (showVersion ())
105103 return
106104 }
107105
@@ -411,15 +409,15 @@ func visit(domainNode *graph.DomainNode) {
411409
412410func printNode (domainNode * graph.DomainNode ) {
413411 if config .details {
414- fmt .Fprintln (os .Stdout , domainNode )
412+ _ , _ = fmt .Fprintln (os .Stdout , domainNode )
415413 } else {
416- fmt .Fprintln (os .Stdout , domainNode .Domain )
414+ _ , _ = fmt .Fprintln (os .Stdout , domainNode .Domain )
417415 }
418416 if config .checkDNS && ! domainNode .HasDNS {
419417 // TODO print this in a better way
420418 // TODO for debugging
421419 realDomain , _ := dns .ApexDomain (domainNode .Domain )
422- fmt .Fprintf (os .Stdout , "* Missing DNS for: %s\n " , realDomain )
420+ _ , _ = fmt .Fprintf (os .Stdout , "* Missing DNS for: %s\n " , realDomain )
423421
424422 }
425423}
@@ -437,7 +435,7 @@ func certNodeFromCertResult(certResult *driver.CertResult) *graph.CertNode {
437435// TODO map all config json
438436func generateGraphMetadata () map [string ]interface {} {
439437 data := make (map [string ]interface {})
440- data ["version" ] = version ()
438+ data ["version" ] = version
441439 data ["website" ] = "https://lanrat.github.io/certgraph/"
442440 data ["scan_date" ] = time .Now ().UTC ()
443441 data ["command" ] = strings .Join (os .Args , " " )
@@ -455,8 +453,8 @@ func generateGraphMetadata() map[string]interface{} {
455453}
456454
457455// returns the version string
458- func version () string {
459- return fmt .Sprintf ("Git commit : %s [%s] " , gitDate , gitHash )
456+ func showVersion () string {
457+ return fmt .Sprintf ("Version : %s" , version )
460458}
461459
462460// cleanInput attempts to parse the input string as a url to extract the hostname
0 commit comments