Skip to content

feature: adding assets.Manager#Path - #42

Merged
paganotoni merged 1 commit into
mainfrom
feature-adding-assets-path
Nov 14, 2025
Merged

feature: adding assets.Manager#Path#42
paganotoni merged 1 commit into
mainfrom
feature-adding-assets-path

Conversation

@paganotoni

Copy link
Copy Markdown
Contributor

This adds the assets.Manager#Path method as a higher level accessor to assets path. If an error is found by it this returns the passed name.

@paganotoni paganotoni changed the title feature: adding Manager#Path feature: adding assets.Manager#Path Nov 14, 2025
@paganotoni
paganotoni requested a review from Copilot November 14, 2025 21:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 adds a new Path method to the assets Manager as a convenience wrapper around PathFor. The method returns the fingerprinted asset path on success, or falls back to the original name on error, making it easier to use in templates where error handling is cumbersome.

  • Added Manager.Path() method that wraps PathFor() and returns the original name on errors
  • Updated concurrent test loop to use modern Go range syntax (for i := range goroutines)
  • Added comprehensive test coverage for the new Path method with success and error cases

Reviewed Changes

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

File Description
assets/fingerprint.go Implements the new Path method with error-swallowing behavior and adds clarifying comment to PathFor
assets/fingerprint_test.go Adds test coverage for the new Path method and modernizes loop syntax in concurrent test

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

@paganotoni
paganotoni merged commit ec1a593 into main Nov 14, 2025
7 checks passed
@paganotoni
paganotoni deleted the feature-adding-assets-path branch November 14, 2025 21:28
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