mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-09 14:53:00 +03:00
[PR #698] [MERGED] refactor: use github.com/jinzhu/copier for MapStruct #669
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/pocket-id/pocket-id/pull/698
Author: @ItalyPaleAle
Created: 6/29/2025
Status: ✅ Merged
Merged: 6/29/2025
Merged by: @stonith404
Base:
main← Head:copier📝 Commits (1)
495ec22refactor: use github.com/jinzhu/copier for MapStruct📊 Changes
5 files changed (+215 additions, -150 deletions)
View changed files
📝
backend/go.mod(+1 -0)📝
backend/go.sum(+2 -0)📝
backend/internal/dto/dto_mapper.go(+12 -147)➕
backend/internal/dto/dto_mapper_test.go(+197 -0)📝
backend/internal/dto/oidc_dto.go(+3 -3)📄 Description
The current implementation of MapStruct has some limitations, including the fact that it requires the same type in source and destination, and doesn't allow copying from pointer to non-pointer.
Switch the implementation to github.com/jinzhu/copier which is very widely used and comprehensive
Note: this doesn't change the DTO structs, but it can be done in a subsequent PR
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.