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 4 months ago

jan-zabloudil commented 4 months ago

Suggested by @bolshakoff. For additional context see:

Current state

GenerateGitTagURL(ownerSlug, repoSlug, tagName string) (url.URL, error)

Desired state

type githubURL url.URL
GenerateGitTagURL(ownerSlug, repoSlug, tagName string) (githubURL, error)

Benefits of the feature

bolshakoff commented 4 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 4 months ago

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