Skip to content

Conversation

@gocanto
Copy link
Collaborator

@gocanto gocanto commented Oct 16, 2025

Summary

  • import the endpoint package without aliases across handlers and adjust their error/helper usage to match the package name
  • update router and middleware code to use the endpoint package types directly and align associated tests

Testing

  • make format
  • go test ./...

https://chatgpt.com/codex/tasks/task_e_68f096ced62483339e198e4f9efbe8c0

Summary by CodeRabbit

  • Refactor

    • Restructured internal API layer with improved error handling and response mechanisms across core services.
  • Chores

    • Removed internal import aliases and standardized library type usage throughout the codebase.

@gocanto gocanto changed the title Use endpoint package name without alias chore: Use endpoint package name without alias Oct 16, 2025
@gocanto gocanto marked this pull request as draft October 16, 2025 07:21
@coderabbitai
Copy link

coderabbitai bot commented Oct 16, 2025

Walkthrough

This PR performs a systematic refactoring across the codebase, migrating from the internal github.com/oullin/pkg/http package to github.com/oullin/pkg/endpoint package. All handler methods are updated to remove the baseHttp alias and use direct net/http types, with error return types changed from *http.ApiError to *endpoint.ApiError. Business logic remains unchanged.

Changes

Cohort / File(s) Summary
Handler implementations
handler/categories.go, handler/education.go, handler/experience.go, handler/keep_alive.go, handler/keep_alive_db.go, handler/posts.go, handler/profile.go, handler/projects.go, handler/recommendations.go, handler/signatures.go, handler/social.go, handler/talks.go
Updated handler method signatures to use standard http.ResponseWriter and *http.Request instead of baseHttp aliases; changed return type from *http.ApiError to *endpoint.ApiError; replaced error/response helpers with endpoint.* equivalents
Handler utilities
handler/payload/posts.go, handler/file_handler_test.go
Updated function signatures to use http.Request directly; changed error types to endpoint.ApiError
Handler tests
handler/signatures_test.go
Replaced apih.MaxRequestSize reference with endpoint.MaxRequestSize
Main entry point
main.go
Removed baseHttp alias; updated http method constants and serverHandler() return type
Routing and kernel
metal/kernel/app.go, metal/kernel/helpers.go, metal/kernel/kernel_test.go, metal/router/router.go, metal/router/static.go
Updated baseHttp references to direct http usage; migrated handler construction from http.MakeApiHandler to endpoint.MakeApiHandler; updated interface method signatures
Endpoint package (renamed from http)
pkg/endpoint/handler.go, pkg/endpoint/handler_test.go, pkg/endpoint/request.go, pkg/endpoint/request_test.go, pkg/endpoint/response.go, pkg/endpoint/response_test.go, pkg/endpoint/schema.go, pkg/endpoint/schema_test.go, pkg/endpoint/scope_api_error.go
Package renamed from http to endpoint; updated all public function signatures to use http.ResponseWriter, *http.Request instead of baseHttp aliases
Middleware core
pkg/middleware/pipeline.go, pkg/middleware/pipeline_test.go, pkg/middleware/public_middleware.go, pkg/middleware/public_middleware_test.go, pkg/middleware/token_middleware.go, pkg/middleware/token_middleware_test.go, pkg/middleware/token_middleware_additional_test.go
Updated middleware handler signatures from http.ApiHandler to endpoint.ApiHandler; changed return types from *http.ApiError to *endpoint.ApiError
Middleware guards
pkg/middleware/mwguards/mw_response_messages.go, pkg/middleware/mwguards/valid_timestamp_guard.go, pkg/middleware/mwguards/valid_timestamp_guard_test.go
Updated error constructor return types from *http.ApiError to *endpoint.ApiError; replaced internal error construction calls
Portal utilities
pkg/portal/support.go
Removed baseHttp alias; updated function signatures to use http.Request directly
SEO client tests
metal/cli/seo/client_test.go
Updated test handler types from *basehttp.ApiError to *endpoint.ApiError; replaced error construction calls

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~35 minutes

Rationale: While the PR touches 40+ files, the changes follow a highly repetitive and systematic pattern—consistently replacing baseHttp aliases with net/http, migrating error types to endpoint.ApiError, and updating helper function references. The low heterogeneity of changes (same transformation applied uniformly) reduces per-file complexity. However, the large volume necessitates careful verification that all cross-references and import paths are correctly updated throughout the codebase.

Possibly related PRs

Poem

🐰 From baseHttp we hop away,
To endpoint bright and new, hooray!
No more aliases, just clean imports here,
The refactor's done, the path is clear! 🎉

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 4.41% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title succinctly describes the core change of removing an alias and using the endpoint package name directly, clearly reflecting the main update without extraneous detail.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch gus/rename-pkg/http-to-pkg/endpoint-2025-10-16

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0af2f86 and 3f850b5.

📒 Files selected for processing (42)
  • handler/categories.go (3 hunks)
  • handler/education.go (2 hunks)
  • handler/experience.go (2 hunks)
  • handler/file_handler_test.go (3 hunks)
  • handler/keep_alive.go (3 hunks)
  • handler/keep_alive_db.go (3 hunks)
  • handler/payload/posts.go (2 hunks)
  • handler/posts.go (4 hunks)
  • handler/profile.go (2 hunks)
  • handler/projects.go (2 hunks)
  • handler/recommendations.go (2 hunks)
  • handler/signatures.go (4 hunks)
  • handler/signatures_test.go (2 hunks)
  • handler/social.go (2 hunks)
  • handler/talks.go (2 hunks)
  • main.go (3 hunks)
  • metal/cli/seo/client_test.go (2 hunks)
  • metal/kernel/app.go (2 hunks)
  • metal/kernel/helpers.go (2 hunks)
  • metal/kernel/kernel_test.go (2 hunks)
  • metal/router/router.go (4 hunks)
  • metal/router/static.go (1 hunks)
  • pkg/endpoint/handler.go (2 hunks)
  • pkg/endpoint/handler_test.go (1 hunks)
  • pkg/endpoint/request.go (1 hunks)
  • pkg/endpoint/request_test.go (1 hunks)
  • pkg/endpoint/response.go (11 hunks)
  • pkg/endpoint/response_test.go (1 hunks)
  • pkg/endpoint/schema.go (2 hunks)
  • pkg/endpoint/schema_test.go (1 hunks)
  • pkg/endpoint/scope_api_error.go (4 hunks)
  • pkg/middleware/mwguards/mw_response_messages.go (2 hunks)
  • pkg/middleware/mwguards/valid_timestamp_guard.go (2 hunks)
  • pkg/middleware/mwguards/valid_timestamp_guard_test.go (4 hunks)
  • pkg/middleware/pipeline.go (2 hunks)
  • pkg/middleware/pipeline_test.go (1 hunks)
  • pkg/middleware/public_middleware.go (4 hunks)
  • pkg/middleware/public_middleware_test.go (5 hunks)
  • pkg/middleware/token_middleware.go (7 hunks)
  • pkg/middleware/token_middleware_additional_test.go (6 hunks)
  • pkg/middleware/token_middleware_test.go (6 hunks)
  • pkg/portal/support.go (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (32)
metal/kernel/kernel_test.go (3)
pkg/middleware/pipeline.go (1)
  • Pipeline (10-15)
pkg/middleware/public_middleware.go (1)
  • PublicMiddleware (20-29)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
metal/router/router.go (3)
pkg/middleware/pipeline.go (1)
  • Pipeline (10-15)
pkg/endpoint/schema.go (1)
  • ApiHandler (34-34)
pkg/endpoint/handler.go (1)
  • MakeApiHandler (11-32)
pkg/middleware/token_middleware_additional_test.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/middleware/pipeline_test.go (1)
pkg/endpoint/schema.go (2)
  • ApiHandler (34-34)
  • ApiError (11-16)
pkg/middleware/pipeline.go (1)
pkg/endpoint/schema.go (2)
  • ApiHandler (34-34)
  • Middleware (36-36)
pkg/middleware/token_middleware.go (4)
pkg/endpoint/schema.go (2)
  • ApiHandler (34-34)
  • ApiError (11-16)
pkg/middleware/headers.go (1)
  • AuthTokenHeaders (3-12)
pkg/portal/consts.go (2)
  • AuthAccountNameKey (20-20)
  • RequestIDKey (21-21)
database/model.go (1)
  • APIKey (27-39)
metal/kernel/helpers.go (1)
metal/kernel/app.go (1)
  • App (17-24)
pkg/middleware/public_middleware.go (2)
pkg/endpoint/schema.go (2)
  • ApiHandler (34-34)
  • ApiError (11-16)
pkg/endpoint/response.go (1)
  • LogInternalError (99-107)
handler/recommendations.go (3)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
pkg/middleware/public_middleware_test.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/scope_api_error.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
metal/cli/seo/client_test.go (2)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/response.go (1)
  • InternalError (89-97)
handler/keep_alive.go (2)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/response.go (3)
  • LogUnauthorisedError (129-137)
  • MakeNoCacheResponse (42-55)
  • LogInternalError (99-107)
handler/keep_alive_db.go (2)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/response.go (3)
  • LogUnauthorisedError (129-137)
  • LogInternalError (99-107)
  • MakeNoCacheResponse (42-55)
handler/experience.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/experience.go (1)
  • ExperienceResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
handler/posts.go (6)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/support.go (1)
  • CloseWithLog (92-100)
pkg/endpoint/request.go (1)
  • ParseRequestBody (12-31)
handler/payload/posts.go (3)
  • IndexRequestBody (13-19)
  • GetSlugFrom (48-52)
  • GetPostsResponse (54-79)
pkg/endpoint/response.go (3)
  • InternalError (89-97)
  • BadRequestError (109-117)
  • NotFound (150-158)
pkg/middleware/mwguards/mw_response_messages.go (1)
  • NotFound (88-99)
pkg/middleware/mwguards/mw_response_messages.go (2)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/response.go (1)
  • NotFound (150-158)
handler/file_handler_test.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/middleware/mwguards/valid_timestamp_guard_test.go (1)
pkg/middleware/mwguards/valid_timestamp_guard.go (1)
  • NewValidTimestamp (16-21)
pkg/middleware/token_middleware_test.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/endpoint/response.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
handler/education.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/education.go (1)
  • EducationResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
handler/signatures_test.go (1)
pkg/endpoint/request.go (1)
  • MaxRequestSize (10-10)
pkg/endpoint/handler.go (1)
pkg/endpoint/schema.go (2)
  • ApiHandler (34-34)
  • ApiError (11-16)
handler/projects.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/projects.go (1)
  • ProjectsResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
pkg/middleware/mwguards/valid_timestamp_guard.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
handler/signatures.go (6)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/support.go (1)
  • CloseWithLog (92-100)
handler/payload/signatures.go (1)
  • SignatureRequest (3-9)
pkg/endpoint/request.go (1)
  • MaxRequestSize (10-10)
pkg/endpoint/response.go (4)
  • LogBadRequestError (119-127)
  • UnprocessableEntity (139-148)
  • LogInternalError (99-107)
  • MakeResponseFrom (20-40)
pkg/portal/validator.go (1)
  • Validator (13-16)
handler/talks.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/talks.go (1)
  • TalksResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
metal/router/static.go (1)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
handler/categories.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
database/repository/categories.go (1)
  • Categories (13-15)
handler/paginate/paginate.go (1)
  • MakeFrom (10-43)
pkg/endpoint/response.go (1)
  • InternalError (89-97)
handler/profile.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/profile.go (1)
  • ProfileResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
handler/social.go (4)
pkg/endpoint/schema.go (1)
  • ApiError (11-16)
pkg/portal/parser.go (1)
  • ParseJsonFile (9-29)
handler/payload/social.go (1)
  • SocialResponse (3-6)
pkg/endpoint/response.go (2)
  • InternalError (89-97)
  • MakeResponseFrom (20-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: test (1.25.3)
🔇 Additional comments (32)
pkg/middleware/mwguards/valid_timestamp_guard.go (1)

23-59: Endpoint refactor looks solid

Returning *endpoint.ApiError and defaulting nowFn to time.Now keep the guard behavior consistent while aligning with the new package split. No further action needed.

pkg/middleware/mwguards/valid_timestamp_guard_test.go (1)

24-67: Tests stay aligned

The switch to net/http constants keeps the assertions in sync with the production change. Looks good.

pkg/endpoint/scope_api_error.go (4)

6-6: Clean migration to standard library.

The change from aliased baseHttp to the standard net/http package is correct and improves code clarity by removing unnecessary aliasing.


14-18: Field type correctly updated.

The migration of the request field from *baseHttp.Request to *http.Request is consistent with the import changes and maintains the same functionality.


38-100: HTTP constants and functions migrated correctly.

The updates to use http.StatusInternalServerError (line 44) and http.StatusText (line 54) are correct and maintain the same functionality. The Sentry scope enrichment logic remains intact and properly uses the Scope API.


20-22: Constructor signature change verified and correct.

All callers of NewScopeApiError have been successfully updated to pass *http.Request. No remaining baseHttp references exist in the codebase, confirming the migration is complete.

metal/kernel/helpers.go (1)

71-77: Mux return type alignment looks good

Thanks for updating GetMux to expose the concrete *http.ServeMux; this keeps the kernel layer in sync with the router refactor without changing behavior.

pkg/endpoint/schema.go (1)

34-36: ApiHandler signature now matches stdlib http

The handler type now mirrors the standard net/http contract, simplifying call sites while preserving the endpoint-specific error plumbing.

pkg/portal/support.go (1)

102-187: *Portal helpers now accept standard http.Request

Good cleanup—these helpers line up with the rest of the codebase’s switch to net/http without altering their logic.

pkg/endpoint/handler.go (1)

11-32: Great swap to direct net/http handler types.

The handler factory now returns http.HandlerFunc and passes http.ResponseWriter/*http.Request through cleanly, so downstream call sites can drop the old aliasing without behavior changes. Nicely done.

handler/payload/posts.go (1)

8-8: LGTM!

The removal of the baseHttp alias and direct use of net/http is clean and consistent with the broader refactoring.

Also applies to: 48-48

metal/kernel/kernel_test.go (1)

371-371: LGTM!

The test handler signature correctly aligns with the endpoint.ApiError type, consistent with the package migration.

pkg/endpoint/request.go (1)

1-1: LGTM!

The package rename and signature update are clean. The ParseRequestBody function now correctly accepts *http.Request from the standard library, consistent with the endpoint package migration.

Also applies to: 7-7, 12-12

pkg/middleware/public_middleware.go (1)

44-45: LGTM!

The middleware correctly adopts endpoint.ApiHandler and endpoint.ApiError types. The internal error construction properly uses endpoint.LogInternalError.

Also applies to: 86-86, 99-99

main.go (1)

6-6: LGTM!

The removal of the baseHttp alias and direct use of standard net/http types throughout the server wiring is clean and correct.

Also applies to: 45-45, 52-58, 81-81

pkg/middleware/pipeline.go (1)

17-17: LGTM!

The Chain method signature correctly adopts endpoint.ApiHandler and endpoint.Middleware types, maintaining the middleware composition logic.

handler/recommendations.go (1)

22-22: LGTM!

The handler signature and error/response construction are correctly updated to use endpoint package types while preserving the business logic.

Also applies to: 28-28, 31-31

handler/categories.go (1)

26-26: LGTM!

The handler signature and error construction are correctly updated to use endpoint package types. The pagination and encoding logic remain unchanged.

Also applies to: 33-33, 51-51

metal/router/static.go (1)

4-11: LGTM! Clean migration to endpoint package.

The interface signature and imports have been updated correctly to use standard net/http types and endpoint.ApiError. This aligns well with the broader refactoring across the codebase.

pkg/middleware/token_middleware_test.go (1)

21-43: LGTM! Test signatures updated consistently.

The test handler signatures have been correctly updated to use *endpoint.ApiError throughout, maintaining consistency with the production code changes.

handler/file_handler_test.go (2)

5-15: LGTM! Test interface migrated correctly.

The fileHandler interface and imports have been updated to use standard net/http types and endpoint.ApiError, consistent with the migration pattern.


47-71: LGTM! Status code checks updated.

The status code assertions now correctly use http.StatusOK and http.StatusNotModified from the standard library.

handler/experience.go (1)

5-31: LGTM! Handler migrated cleanly to endpoint package.

The ExperienceHandler has been successfully updated to use standard net/http types and endpoint package helpers. The logic and control flow remain unchanged—this is a clean refactoring.

handler/projects.go (1)

5-31: LGTM! Consistent handler migration.

The ProjectsHandler follows the same clean migration pattern as other handlers: updated method signature with standard net/http types and migrated error/response construction to the endpoint package.

handler/education.go (1)

5-31: LGTM! Handler refactored correctly.

The EducationHandler has been properly migrated to use standard net/http types and endpoint package helpers, maintaining the same logic and control flow as before.

pkg/endpoint/response.go (1)

1-158: LGTM! Core endpoint package successfully migrated.

The endpoint package has been comprehensively updated to use standard net/http types throughout:

  • Response struct fields and methods now use http.ResponseWriter and *http.Request
  • Status constants updated to use http.StatusXYZ
  • Headers callback signatures updated accordingly

This forms the foundation for the handler migrations seen across the codebase. The changes are systematic and consistent.

handler/social.go (1)

5-31: LGTM! Final handler migrated successfully.

The SocialHandler completes the set of handlers migrated to the endpoint package. The changes are consistent with the refactoring pattern applied throughout this PR: standard net/http types in the signature and endpoint package helpers for error and response construction.

metal/cli/seo/client_test.go (1)

12-33: LGTM! Test types and error constructors properly migrated.

The test file has been correctly updated to use endpoint.ApiError and endpoint.InternalError. The test logic remains intact while aligning with the new package structure.

handler/posts.go (2)

26-60: LGTM! Index method properly migrated to endpoint package.

The handler signature, request parsing, and error handling have been correctly updated to use endpoint.ApiError and endpoint helper functions. The business logic remains unchanged.


62-82: LGTM! Show method properly migrated to endpoint package.

The handler correctly uses endpoint.BadRequestError, endpoint.NotFound, and endpoint.InternalError for error handling. The method signature and logic are correctly updated.

pkg/middleware/mwguards/mw_response_messages.go (1)

5-125: LGTM! Error constructors properly migrated to endpoint package.

All seven error constructor functions have been correctly updated to return *endpoint.ApiError instead of the previous type. The HTTP status codes correctly reference http.Status* constants from the standard library, and the error structure initialization is consistent across all functions.

pkg/middleware/token_middleware.go (1)

7-236: LGTM! Middleware properly migrated to endpoint package.

Migration verified complete:

  • All required imports present (context, encoding/hex, fmt, endpoint)
  • No lingering references to old github.com/oullin/pkg/http package or baseHttp alias
  • Code correctly uses endpoint.ApiHandler and endpoint.ApiError types throughout
  • Authentication flow logic intact with updated type system

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@gemini-code-assist
Copy link

Summary of Changes

Hello @gocanto, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request undertakes a significant refactoring effort by renaming the core http package to endpoint. This change aims to enhance the semantic clarity of the codebase, ensuring that the package name accurately describes its responsibilities. The update is propagated throughout the application, affecting handlers, routers, and middleware, to maintain consistency and improve maintainability.

Highlights

  • Package Renaming: The pkg/http package has been renamed to pkg/endpoint to better reflect its purpose of handling API endpoint-related functionalities.
  • Import Path Updates: All references to the old pkg/http import path have been updated to pkg/endpoint across various handler, router, and middleware files.
  • Alias Removal: The change also involves removing explicit aliases (e.g., pkgHttp, apih) for the endpoint package, promoting direct usage of the package name for improved readability and consistency.
  • Type and Function Updates: All types and functions previously accessed via the http package (e.g., http.ApiError, http.InternalError, http.MakeResponseFrom, http.MaxRequestSize) have been updated to use the new endpoint package name.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a well-executed refactoring that renames the pkg/http package to pkg/endpoint and removes aliases for it across the codebase. These changes improve code clarity and consistency by using a more descriptive package name and avoiding potential confusion with the standard net/http package. The refactoring has been applied consistently across all relevant files, including handlers, middleware, and tests. The changes are clean and align with the stated goal of the pull request. I have not found any issues with the implementation.

@gocanto gocanto marked this pull request as ready for review October 16, 2025 07:33
@gocanto gocanto merged commit 4d44ff1 into main Oct 16, 2025
3 checks passed
@gocanto gocanto deleted the gus/rename-pkg/http-to-pkg/endpoint-2025-10-16 branch October 16, 2025 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants