Skip to content

Commit

Permalink
add commandline parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
encbladexp committed Sep 30, 2024
1 parent 5897ea9 commit be8c698
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ package main
import (
"encoding/csv"
"errors"
"flag"
"fmt"
"os"
"strings"
"time"
)

const FILENAME = "index.txt"
const TIMEFORMAT_SHORT = "060102150405Z"
const TIMEFORMAT_LONG = "20060102150405Z"

Expand Down Expand Up @@ -121,7 +121,9 @@ func (c *Certificates) print_expired() {
}

func main() {
file, err := os.Open(FILENAME)
filename := flag.String("filename", "index.txt", "Path to our OpenSSL index file")
flag.Parse()
file, err := os.Open(*filename)
if err != nil {
panic(err)
}
Expand Down

0 comments on commit be8c698

Please sign in to comment.