Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Supported Go entry point for building a map

Aperta
#178 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
api, cli, documentation

Direzione di ricerca

Start by reading the wiring in internal/cli/map.go and the compatibility guidance in docs/COMPATIBILITY.md. Review the map fixtures and existing CLI behavior before deciding the public package types, compatibility promise, and runnable examples. Done means the library and CLI produce equal validated output, with a contract test and updated compatibility documentation.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

follow-up

Goal

Give Go programs a supported way to build a dircue map in-process, without shelling out to the CLI.

Current state (1.0.0)

  • The module github.com/war-and-code/dircue exposes about 29 packages under pkg/, for example pkg/scanner.Scan, pkg/mapbuild.Build and pkg/mapdoc.
  • Producing a map means wiring the scanner, the deployables and intent collectors, the source digest and document validation together. That wiring lives in internal/cli/map.go, which outside code cannot import.
  • There are no library docs or examples.
  • docs/COMPATIBILITY.md states that pkg/ packages are unsupported and may change or move within 1.x.

Proposal

  • Add one small public entry point, sketched below.
    doc, err := dircuemap.Build(ctx, path, dircuemap.Options{...})
    
    • It returns a validated mapdoc.Document equal to dircue map --json output for the same inputs and settings.
    • The same function should back the CLI, so the two can't drift.
  • Decide which types the entry point exposes (the document model, options and errors), and document them with runnable examples.
  • Add a contract test that compares library output with CLI output over the map fixtures.
  • Decide the compatibility promise for the new package, and record it in docs/COMPATIBILITY.md.

Out of scope

Stabilizing every pkg/ package. See the companion issue on which packages stay public.

Lingua principale
Go
Stelle
0
Fork
0
Merge medio
4h 47m
PR unite (30g)
52

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di war-and-code/dircue

Tutte le issue di war-and-code/dircue

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.