Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#100 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
go
Lĩnh vực
backend-api-design, cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Go
Star
1
Fork
1
Merge trung bình
5 ngày 2 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/subenum

Tất cả issue của TMHSDigital/subenum

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.