Commit 0f4a257

mo khan <mo@mokhan.ca>
2025-07-31 15:37:52
feat: add -f option to provide path to Procfile
1 parent 8e08347
Changed files (1)
main.go
@@ -2,6 +2,7 @@ package main
 
 import (
 	"bufio"
+	"flag"
 	"os"
 	"os/exec"
 	"os/signal"
@@ -13,7 +14,10 @@ import (
 )
 
 func main() {
-	file, _ := os.Open("Procfile")
+	procfilePath := flag.String("f", "Procfile", "path to Procfile")
+	flag.Parse()
+
+	file, _ := os.Open(*procfilePath)
 	defer file.Close()
 
 	var cmds []*exec.Cmd