initial commit
This commit is contained in:
24
cmd/oplcli.go
Normal file
24
cmd/oplcli.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
oplcli "git.kapelle.org/niklas/opl-cli/internal"
|
||||
"github.com/alexflint/go-arg"
|
||||
)
|
||||
|
||||
type ScanCmd struct {
|
||||
File string `arg:"positional"`
|
||||
}
|
||||
|
||||
type args struct {
|
||||
Scan *ScanCmd `arg:"subcommand:scan"`
|
||||
}
|
||||
|
||||
func Run() {
|
||||
var args args
|
||||
arg.MustParse(&args)
|
||||
|
||||
switch {
|
||||
case args.Scan != nil:
|
||||
oplcli.Scan(args.Scan.File, oplcli.Config{})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user