Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Engine messages hard-code CLI flag names; give them structured codes instead

Offen
#100 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
go

Rechercherichtung

Start by reading the message strings in internal/scan/runner.go, options.go, scope.go, verdict.go, internal/dns/resolver.go and transport.go, then inspect the rewrite tables in pkg/subenum/subenum.go and their tests. The issue allows either structured codes and settings or neutral setting names, but replacing message parsing across engine and front ends is broad design work. Done means no engine message hard-codes CLI flags and the CLI, TUI and pkg/subenum each present settings in their own terms without parsing message text.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area: scan enhancement

Why it matters

Engine messages name command-line flags ("Use -force to scan anyway", "set -max-queries or -force", "concurrency (-t) must be at least 1"). That reads well in the CLI but is wrong anywhere else: the TUI has form fields, and pkg/subenum callers have Config fields, not flags.

Evidence

  • About 40 flag references in message strings across internal/scan/runner.go, options.go, scope.go, verdict.go and internal/dns/resolver.go, transport.go.
  • pkg/subenum works around this with a regexp that rewrites -flag to the matching Config field (flagFields and fieldNames in pkg/subenum/subenum.go). It works and is tested, but a new message that names a flag missing from the table gets through unchanged.

Suggested approach

  • Give events and validation errors a structured part: a code such as wildcard_refused or cap_reached, and the setting involved (force, max_queries). Each front end then writes its own wording.
  • Or, as a smaller step, have the engine refer to settings by neutral names and let each front end map them.
  • Delete the regexp rewrite in pkg/subenum once the engine no longer writes flag names.

Done when

No engine message hard-codes a CLI flag, and the CLI, the TUI and pkg/subenum each name settings in their own terms without parsing message text.

Vorherrschende Sprache
Go
Sterne
1
Forks
1
Ø Merge
14 T. 9 Std.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/subenum

Alle Issues in TMHSDigital/subenum

Ähnliche Issues

Weitere Issues zu Go

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.