feat: port flag
This commit is contained in:
@@ -2,14 +2,14 @@ package app
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"os"
|
||||
"flag"
|
||||
"strings"
|
||||
)
|
||||
|
||||
func GetFilePath() (string, error) {
|
||||
fp := ""
|
||||
|
||||
for _, v := range os.Args[1:] {
|
||||
for _, v := range flag.Args() {
|
||||
if !strings.HasPrefix(v, "-") {
|
||||
fp = v
|
||||
return fp, nil
|
||||
|
||||
Reference in New Issue
Block a user