func()

in internal/utils/fs.go [135:150]


func (s *Symlink) Link() error {
	// Check if the symlink already exists
	if _, err := os.Lstat(s.Source); err == nil {
		// If the symlink exists, remove it
		if err := os.Remove(s.Source); err != nil {
			return err
		}
	}

	// Create the symlink
	if err := os.Symlink(s.Target, s.Source); err != nil {
		return err
	}

	return nil
}