Skip to content

Commit

Permalink
chore: fix norm to camelcase
Browse files Browse the repository at this point in the history
  • Loading branch information
louonezime committed Aug 31, 2024
1 parent b9ad771 commit be582a2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
10 changes: 5 additions & 5 deletions src/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"os"
)

func Parse_cli_args() (models.Forcing_params, error) {
var params models.Forcing_params
func ParseCliArgs() (models.ForcingParams, error) {
var params models.ForcingParams

UrlError := errors.New("No url given")
ThreadsError := errors.New("Wrong number of threads given")
WordListError := errors.New("No wordlist given")
UrlError := errors.New("no url given")
ThreadsError := errors.New("wrong number of threads given")
WordListError := errors.New("no wordlist given")

forkptr := flag.Bool("v", false, "Verbose program")
statusPtr := flag.String("status-codes", "200,401,403,404,429,500", "Comma-separated list of status codes to match")
Expand Down
6 changes: 3 additions & 3 deletions src/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

func main() {

forcing_params, err := cli.Parse_cli_args()
forcingParams, err := cli.ParseCliArgs()

if err != nil {
panic(err)
}
fmt.Println(forcing_params)
fmt.Println(forcingParams)

query.MainRequest(&forcing_params)
query.MainRequest(&forcingParams)
}
2 changes: 1 addition & 1 deletion src/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type MatchCriteria struct {
BodyContains string
}

type Forcing_params struct {
type ForcingParams struct {
Workers int
Url string
Wordlist string
Expand Down
4 changes: 2 additions & 2 deletions src/query/callWorker.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"sync"
)

func executeQueryFromFile(wg *sync.WaitGroup, params *models.Forcing_params, currentPath chan string) {
func executeQueryFromFile(wg *sync.WaitGroup, params *models.ForcingParams, currentPath chan string) {
defer wg.Done()
for taskData := range currentPath {
QueryExecute(params, taskData, "GET")
}
}

func MainRequest(params *models.Forcing_params) {
func MainRequest(params *models.ForcingParams) {
wg := &sync.WaitGroup{}
wg.Add(params.Workers)
channel := make(chan string)
Expand Down
2 changes: 1 addition & 1 deletion src/query/queryExecute.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"net/http"
)

func QueryExecute(params *models.Forcing_params, path string, method string) {
func QueryExecute(params *models.ForcingParams, path string, method string) {
client := &http.Client{}
req, err := http.NewRequest(method, params.Url+path, nil)
if err != nil {
Expand Down

0 comments on commit be582a2

Please sign in to comment.