Skip to content

Commit

Permalink
rewritten forgotten flag prints
Browse files Browse the repository at this point in the history
  • Loading branch information
miampf committed Apr 3, 2024
1 parent dd1ec56 commit fd9a8b8
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 44 deletions.
6 changes: 1 addition & 5 deletions hack/bazel-deps-mirror/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ func runCheck(cmd *cobra.Command, _ []string) error {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
mirror: %t
mirror-unauthenticated: %t
`, flags.mirror, flags.mirrorUnauthenticated))
log.Debug("Using flags", "mirror", flags.mirror, "mirrorUnauthenticated", flags.mirrorUnauthenticated)

filesHelper, err := bazelfiles.New()
if err != nil {
Expand Down
6 changes: 1 addition & 5 deletions hack/bazel-deps-mirror/fix.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,7 @@ func runFix(cmd *cobra.Command, _ []string) error {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
unauthenticated: %t
dry-run: %t`,
flags.unauthenticated, flags.dryRun))
log.Debug("Using flags", "unauthenticated", flags.unauthenticated, "dryRun", flags.dryRun)

fileHelper, err := bazelfiles.New()
if err != nil {
Expand Down
6 changes: 1 addition & 5 deletions hack/oci-pin/sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,7 @@ func runSum(cmd *cobra.Command, _ []string) error {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
image-repo-tag: %q
oci-path: %q`,
flags.imageRepoTag, flags.ociPath))
log.Debug("Using flags", "imageRepoTag", flags.imageRepoTag, "ociPath", flags.ociPath)

registry, prefix, name, tag, err := splitRepoTag(flags.imageRepoTag)
if err != nil {
Expand Down
13 changes: 2 additions & 11 deletions internal/api/versionsapi/cli/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,8 @@ func runAdd(cmd *cobra.Command, _ []string) (retErr error) {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
dryrun: %t
kind: %q
latest: %t
ref: %q
release: %t
stream: %q
version: %q`,
flags.dryRun, flags.kind, flags.latest, flags.ref,
flags.release, flags.stream, flags.version))
log.Debug("Using flags", "dryRun", flags.dryRun, "kind", flags.kind, "latest", flags.latest, "ref", flags.ref,
"release", flags.release, "stream", flags.stream, "version", flags.version)

log.Debug("Validating flags")
if err := flags.validate(log); err != nil {
Expand Down
7 changes: 1 addition & 6 deletions internal/api/versionsapi/cli/latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ func runLatest(cmd *cobra.Command, _ []string) (retErr error) {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
ref: %q
stream: %q
json: %t
`, flags.ref, flags.stream, flags.json))
log.Debug("Using flags", "ref", flags.ref, "stream", flags.stream, "json", flags.json)

log.Debug("Validating flags")
if err := flags.validate(); err != nil {
Expand Down
14 changes: 2 additions & 12 deletions internal/api/versionsapi/cli/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,8 @@ func runList(cmd *cobra.Command, _ []string) (retErr error) {
return err
}
log := logger.NewTextLogger(flags.logLevel)
log.Debug(fmt.Sprintf(
`Parsed flags:
bucket: %q
distribution-id: %q
json: %t
verbose: %v
minor-version: %q
ref: %q
region: %q
stream: %q`,
flags.bucket, flags.distributionID, flags.json, flags.logLevel, flags.minorVersion,
flags.ref, flags.region, flags.stream))
log.Debug("Using flags", "bucket", flags.bucket, "distributionID", flags.distributionID, "json", flags.json, "minorVersion", flags.minorVersion,
"ref", flags.ref, "region", flags.region, "stream", flags.stream)

log.Debug("Validating flags")
if err := flags.validate(); err != nil {
Expand Down

0 comments on commit fd9a8b8

Please sign in to comment.