File tree 1 file changed +26
-4
lines changed
1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change 4
4
/*
5
5
Iffmaster is a tool to inspect IFF files as defined under EA-85.
6
6
7
- Usage:
7
+ Usage: [options]
8
8
9
9
iffmaster
10
10
11
- There aren't any command line options yet .
11
+ -version: Show the application's version .
12
12
*/
13
13
package main
14
14
15
- import "github.com/mattrust/iffmaster/internal/gui"
15
+ import (
16
+ "flag"
17
+ "fmt"
18
+ "os"
19
+
20
+ "github.com/mattrust/iffmaster/internal/gui"
21
+ )
22
+
23
+ const version = "1.0.0"
16
24
17
25
func main () {
18
- gui .OpenGUI ()
26
+ showVersion := flag .Bool ("version" , false , "Display the version of iffmaster" )
27
+ flag .Parse ()
28
+
29
+ if * showVersion {
30
+ fmt .Println ("iffmaster version" , version )
31
+ os .Exit (0 )
32
+ }
33
+
34
+ if flag .NArg () > 0 {
35
+ //filename := flag.Arg(0)
36
+ //fmt.Println("Filename provided:", filename)
37
+ // You can add code here to handle the filename, e.g., open the file
38
+ } else {
39
+ gui .OpenGUI ()
40
+ }
19
41
}
You can’t perform that action at this time.
0 commit comments