Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use placeholder as default if field left empty and is required #1642

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

hxnyk
Copy link
Contributor

@hxnyk hxnyk commented Aug 18, 2023

Description:

If nothing's been entered for a required field, populate the value with the placeholder value & bug fixes @mcastorina

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@hxnyk hxnyk requested a review from a team as a code owner August 18, 2023 20:50
@@ -49,7 +50,7 @@ func GetTrufflehogConfiguration() truffleCmdModel {
Key: "concurrency",
Required: false,
Help: "Number of concurrent workers.",
Placeholder: "1",
Placeholder: strconv.Itoa(runtime.NumCPU()),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which was the default concurrency before we added the tui stuff?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated version. We copied it from here:

concurrency = cli.Flag("concurrency", "Number of concurrent workers.").Default(strconv.Itoa(runtime.NumCPU())).Int()

pkg/tui/pages/source_select/source_select.go Outdated Show resolved Hide resolved
pkg/tui/sources/github/github.go Outdated Show resolved Hide resolved
pkg/tui/sources/syslog/syslog.go Show resolved Hide resolved
Copy link
Collaborator

@rosecodym rosecodym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, didn't notice that you were waiting on me

@mcastorina mcastorina merged commit 4598244 into main Oct 3, 2023
9 checks passed
@mcastorina mcastorina deleted the tui-placeholder-defaults branch October 3, 2023 00:21
Phoenix591 pushed a commit to Phoenix591/trufflehog that referenced this pull request Oct 27, 2023
…lesecurity#1642)

* Use placeholder as default if field left empty and is required

Co-authored-by: mcastorina <[email protected]>

* Drop unused func

* uncomment azure source

* update wording

---------

Co-authored-by: mcastorina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants