fix: commands flags not being parsed

This commit is contained in:
Gustavo "Guz" L. de Mello
2024-05-24 11:28:23 -03:00
parent ccd798e613
commit 73a38e9083
3 changed files with 6 additions and 0 deletions

View File

@@ -13,6 +13,8 @@ func main() {
dir := flag.String("d", "./dist", "the directory to write the files")
staticDir := flag.String("s", "./static", "the directory to copy static files from")
flag.Parse()
w := internals.StaticWriter{
DistDir: dir,
StaticDir: staticDir,

View File

@@ -24,6 +24,8 @@ func main() {
staticDir := flag.String("s", "./static", "the directory to copy static files from")
port := flag.Int("p", 8080, "the port to run the server")
flag.Parse()
configFile, err := os.ReadFile(*configPath)
if err != nil {
logger.Fatalf("Unable to read vercel.json file due to:\n%s", err)

View File

@@ -18,6 +18,8 @@ func main() {
staticDir := flag.String("s", "./static", "the directory to copy static files from")
port := flag.Int("p", 8080, "the port to run the server")
flag.Parse()
mux := http.NewServeMux()
config.APIROUTES(mux)