Skip to content

Use values on repository interface - #12

Merged
serroba merged 1 commit into
mainfrom
dev
Jan 2, 2026
Merged

Use values on repository interface#12
serroba merged 1 commit into
mainfrom
dev

Conversation

@serroba

@serroba serroba commented Jan 2, 2026

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings January 2, 2026 07:19
@codecov

codecov Bot commented Jan 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (28c3561) to head (623a291).
⚠️ Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #12   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            6         6           
  Lines          176       176           
=========================================
  Hits           176       176           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the Repository interface to use value semantics instead of pointer semantics for the Flag type. The change simplifies the API by passing and returning Flag structs by value rather than by pointer.

Key changes:

  • Updated the Repository interface to accept and return Flag values instead of pointers
  • Modified the MemoryRepository implementation to store Flag values in the map
  • Updated all callers to pass Flag values instead of pointers

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
internal/flags/repository.go Changed interface methods from pointer-based (*Flag) to value-based (Flag) signatures
internal/flags/memory.go Updated implementation to store and return Flag values, changed map type from map[string]*Flag to map[string]Flag
internal/flags/service.go Updated Create method to pass flag by value instead of &flag
internal/flags/memory_test.go Updated test data initialization from pointer literals to value literals

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@serroba
serroba merged commit 1bc9848 into main Jan 2, 2026
9 checks passed
@serroba
serroba deleted the dev branch January 2, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants