提交 2801e65e 编写于 作者: J Jingwen Owen Ou

Use passin args

上级 c2573f6f
...@@ -3,7 +3,6 @@ package commands ...@@ -3,7 +3,6 @@ package commands
import ( import (
"fmt" "fmt"
"github.com/jingweno/gh/git" "github.com/jingweno/gh/git"
"os"
) )
type Runner struct { type Runner struct {
...@@ -11,7 +10,7 @@ type Runner struct { ...@@ -11,7 +10,7 @@ type Runner struct {
} }
func (r *Runner) Execute() error { func (r *Runner) Execute() error {
args := NewArgs(os.Args[1:]) args := NewArgs(r.Args)
if args.Command == "" { if args.Command == "" {
usage() usage()
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册