From e548e0b9ce8df364dc119cfea057e0b3d4e76a2a Mon Sep 17 00:00:00 2001 From: zackverham <96081108+zackverham@users.noreply.github.com> Date: Mon, 9 Mar 2026 17:46:23 -0400 Subject: [PATCH] Remove unused util.Map function The generic Map function in internal/util/slice.go has no callers in the codebase. Go's standard library and native range loops cover this use case, so the helper is unnecessary dead code. Co-Authored-By: Claude Opus 4.6 --- internal/util/slice.go | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 internal/util/slice.go diff --git a/internal/util/slice.go b/internal/util/slice.go deleted file mode 100644 index 96b0da03c7..0000000000 --- a/internal/util/slice.go +++ /dev/null @@ -1,11 +0,0 @@ -package util - -// Copyright (C) 2023 by Posit Software, PBC. - -func Map[T any](fn func(T) T, list []T) []T { - out := make([]T, len(list)) - for i, item := range list { - out[i] = fn(item) - } - return out -}