Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Parse flags in main()
Browse files Browse the repository at this point in the history
  • Loading branch information
ziadoz committed Sep 26, 2018
1 parent 9f013d3 commit 35457c8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ type result struct {
err error
}

func init() {
func main() {
flag.BoolVar(&ver, "version", false, "The version of media swapper")
flag.Var(&bin, "bin", "The location of the ffmpeg or avconv binary")
flag.Var(&src, "src", "The source directory of mkv/m4a files or an individual mkv/m4a file to swap to mp4/mp3")
flag.Parse()
}

func main() {
if ver {
fmt.Printf("Version: %s\nCommit: %s\nDate: %s\n", version, commit, date)
os.Exit(0)
Expand Down

0 comments on commit 35457c8

Please # to comment.