Skip to content

Commit 0e382e1

Browse files
committed
Add main application entry point and update .gitignore for binary exclusion
1 parent 1ad19f1 commit 0e382e1

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Binaries
2-
dir-dumper
2+
/dir-dumper
33
*.exe
44
*.exe~
55
*.dll

cmd/dir-dumper/main.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package main
2+
3+
import (
4+
"os"
5+
6+
"github.com/bethropolis/dir-dumper/internal/app"
7+
"github.com/bethropolis/dir-dumper/internal/config"
8+
)
9+
10+
func main() {
11+
// Load configuration from command-line flags
12+
cfg := config.New()
13+
14+
// Create and run the application
15+
application := app.New(cfg)
16+
17+
// Run the application
18+
application.Run()
19+
20+
// Close output file if one was opened
21+
if cfg.OutputFile != "" {
22+
if f, ok := application.Output.(*os.File); ok {
23+
f.Close()
24+
}
25+
}
26+
}

0 commit comments

Comments
 (0)