You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
Both CreateListing and UpdateListing are nearly identical in repo/listing.go. The only difference is the check for whether the listing exists and whether a slug is created or not. It's likely these two functions can be refactored to avoid duplication and for clarity.
Also, the name of CreateListing is misleading because it is not persisting anything to disk. Only returning a new Listing object. Thus is might be better named NewListing and just be used as a constructor.