jan-zabloudil / release-manager

Platform-agnostic tool that streamlines daily operations in release management, planning and deployments 🚀
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Implement wrappers for basic types params/struct fields to ensure safety #124

Open jan-zabloudil opened 6 months ago

jan-zabloudil commented 6 months ago

Suggested by @bolshakoff. For additional context see:

Current state

ReadRelease(ctx context.Context, releaseID uuid.UUID) (model.Release, error)

Desired state

ReadRelease(ctx context.Context, releaseID id.Release) (model.Release, error)

Benefits of the feature

bolshakoff commented 6 months ago

Yes. And apart of security, it's also about readability when you have a return parameter of type url.URL vs. githubURL.

bolshakoff commented 6 months ago

Plus it allows to add methods like Valid() etc.