We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When you have fields that are flattened and then prefixed with the nested field name, it would be useful when goverter would support regex.
This example is pretty verbose:
// goverter:map DBObject.ID ID // goverter:map DBObject.CreatedAt CreatedAt // goverter:map DBObject.UpdatedAt UpdatedAt // goverter:map VictoryConditions.NumCriteriaRequired VictoryConditionsNumCriteriaRequired // goverter:map VictoryConditions.YearsPassed VictoryConditionsYearsPassed // goverter:map VictoryConditions.OwnPlanets VictoryConditionsOwnPlanets // goverter:map VictoryConditions.AttainTechLevel VictoryConditionsAttainTechLevel // goverter:map VictoryConditions.AttainTechLevelNumFields VictoryConditionsAttainTechLevelNumFields // goverter:map VictoryConditions.ExceedsScore VictoryConditionsExceedsScore // goverter:map VictoryConditions.ExceedsSecondPlaceScore VictoryConditionsExceedsSecondPlaceScore // goverter:map VictoryConditions.ProductionCapacity VictoryConditionsProductionCapacity // goverter:map VictoryConditions.OwnCapitalShips VictoryConditionsOwnCapitalShips // goverter:map VictoryConditions.HighestScoreAfterYears VictoryConditionsHighestScoreAfterYears // goverter:map VictoryConditions.Conditions VictoryConditionsConditions // goverter:map Area.X AreaX // goverter:map Area.Y AreaY ConvertGameGame(source *cs.Game) *Game
but with regex this is fairly easy to describe:
// goverter:map:regex DBObject.(\w+) $1 // goverter:map:regex VictoryConditions.(\w+) VictoryConditions$1 // goverter:map:regex Area.(\w+) Area$1 ConvertGameGame(source *cs.Game) *Game
Example from: https://github.com/sirgwain/craig-stars/blob/e3683743518428ee08bf8e63bbf1483f3d1e517f/db/converter.go#L140
Please 👍 this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When you have fields that are flattened and then prefixed with the nested field name, it would be useful when goverter would support regex.
This example is pretty verbose:
but with regex this is fairly easy to describe:
Example from: https://github.com/sirgwain/craig-stars/blob/e3683743518428ee08bf8e63bbf1483f3d1e517f/db/converter.go#L140
Please 👍 this issue if you like this functionality. If you have a specific use-case in mind, feel free to comment it.
The text was updated successfully, but these errors were encountered: