Skip to content

UOW-004: Remove Global State #4

@andhijeannot

Description

@andhijeannot

Overview

Phase: 2 - Code Quality
Priority: High
Estimated Effort: 8-10 hours

Problem Description

The global opts variable in generator.go:214 creates tight coupling and makes the code difficult to test and maintain.

Acceptance Criteria

  • All global state removed from generator package
  • Options passed through method parameters or struct fields
  • Code remains fully functional
  • Unit tests can run in isolation
  • No breaking changes to public API
  • Thread-safe operation ensured

Files to Modify

  • internal/generator/generator.go (major refactoring)
  • internal/generator/options.go (new file)
  • cmd/new.go (update to use new generator pattern)

See roadmap/phase2-quality/UOW-004-remove-global-state.md for detailed implementation plan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    highHigh priority

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions