Parent directory edge case

Code reviewMedium14 min

Your task

Review this Go helper that returns the parent directory of a path by trimming after the last slash.