Skip to content

Commit b5681bf

Browse files
chermehdiMehdi Cheracher
authored and
Mehdi Cheracher
committed
add basic command line parsing logic
1 parent edd786f commit b5681bf

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

go.mod

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module github.com/chermehdi/egor
2+
3+
go 1.13
4+
5+
require (
6+
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
7+
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d // indirect
8+
gopkg.in/alecthomas/kingpin.v2 v2.2.6 // indirect
9+
)

main.go

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
package main
22

3-
import "fmt"
3+
import (
4+
"fmt"
5+
"os"
6+
7+
"github.com/chermehdi/egor/parse"
8+
)
49

510
func main() {
6-
fmt.Println("vim-go")
11+
parser := parse.NewParser(os.Args)
12+
options := parser.Parse()
13+
fmt.Printf("%v\n", options)
714
}

0 commit comments

Comments
 (0)