mirror of
https://github.com/anotherhadi/github-recon.git
synced 2026-10-05 10:58:25 +02:00
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
ghrecon "github.com/anotherhadi/gh-recon/gh-recon"
|
||||
"github.com/charmbracelet/log"
|
||||
@@ -10,6 +11,15 @@ import (
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
func wordSepNormalizeFunc(f *flag.FlagSet, name string) flag.NormalizedName {
|
||||
from := []string{".", "_"}
|
||||
to := "-"
|
||||
for _, sep := range from {
|
||||
name = strings.ReplaceAll(name, sep, to)
|
||||
}
|
||||
return flag.NormalizedName(name)
|
||||
}
|
||||
|
||||
func main() {
|
||||
var username string
|
||||
var token string
|
||||
@@ -59,6 +69,7 @@ func main() {
|
||||
"",
|
||||
"Exclude repos from deep scan (comma-separated list)",
|
||||
)
|
||||
flag.CommandLine.SetNormalizeFunc(wordSepNormalizeFunc)
|
||||
flag.Parse()
|
||||
|
||||
styles := log.DefaultStyles()
|
||||
|
||||
Reference in New Issue
Block a user