Skip to content

Conversation

@coderabbitai
Copy link
Contributor

@coderabbitai coderabbitai bot commented Dec 10, 2025

Docstrings generation was requested by @dask-58.

The following files were modified:

  • mcp/resources.go
  • mcp/utils.go
These files were ignored
  • mcp/resources_test.go
  • mcp/utils_test.go
These file types are not supported
  • www/docs/pages/servers/tools.mdx
ℹ️ Note

CodeRabbit cannot perform edits on its own pull requests yet.

Docstrings generation was requested by @dask-58.

* #663 (comment)

The following files were modified:

* `mcp/resources.go`
* `mcp/utils.go`
@coderabbitai
Copy link
Contributor Author

coderabbitai bot commented Dec 10, 2025

Important

Review skipped

CodeRabbit bot authored PR detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

}

// WithLastModified adds a last modified timestamp to the Resource.
// The timestamp should be in ISO 8601 format (e.g., "2025-01-12T15:00:58Z").
Copy link
Contributor

Choose a reason for hiding this comment

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

@coderabbitai fix this duplication please

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ezynda3, I can see the duplication in the WithLastModified function documentation. The comment mentions the ISO 8601 format requirement twice. Here's the fixed version:

// WithLastModified returns a ResourceOption that sets the resource's Annotations.LastModified
// to the provided timestamp. If the resource's Annotations is nil it will be initialized.
// The timestamp is expected to be an ISO 8601 (RFC3339) formatted string (e.g., "2025-01-12T15:00:58Z").
func WithLastModified(timestamp string) ResourceOption {
	return func(r *Resource) {
		if r.Annotations == nil {
			r.Annotations = &Annotations{}
		}
		r.Annotations.LastModified = timestamp
	}
}

This consolidates the information about what the function does and the expected timestamp format into a clear, non-redundant comment.

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