Skip to content

Commit

Permalink
cmd: imp code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizzick committed Sep 11, 2024
1 parent ef58ba6 commit 9d330d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions internal/cmd/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,9 +476,9 @@ func defineFlagVar(flags *flag.FlagSet, value flag.Value, o *commandLineOption)
}
}

// defineTimeDurationFlag defines a flag with for the specified
// defineTimeutilDurationFlag defines a flag with for the specified
// [*timeutil.Duration] pointer and command line option. o must not be nil.
func defineTimeDurationFlag(
func defineTimeutilDurationFlag(
flags *flag.FlagSet,
fieldPtr *timeutil.Duration,
o *commandLineOption,
Expand Down Expand Up @@ -510,7 +510,7 @@ func addOption(flags *flag.FlagSet, fieldPtr any, o *commandLineOption) {
case *[]string:
defineFlagVar(flags, newStringSliceValue(fieldPtr), o)
case *timeutil.Duration:
defineTimeDurationFlag(flags, fieldPtr, o)
defineTimeutilDurationFlag(flags, fieldPtr, o)
default:
panic(fmt.Errorf("unexpected field pointer type %T: %w", fieldPtr, errors.ErrBadEnumValue))
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ func loadServersList(sources []string) []string {
// hostsFiles returns the list of hosts files to resolve from. It's empty if
// resolving from hosts files is disabled.
func (conf *configuration) hostsFiles(ctx context.Context, l *slog.Logger) (paths []string, err error) {
if conf.HostsFileEnabled {
if !conf.HostsFileEnabled {
l.DebugContext(ctx, "hosts files are disabled")

return nil, nil
Expand Down

0 comments on commit 9d330d4

Please sign in to comment.