Skip to content

Commit

Permalink
common: remove unused MapStringStructToSlice
Browse files Browse the repository at this point in the history
It's unused since commit c49ef45 ("metrics: Modularize daemon
metrics registry").

In case similar functionality is needed in the future, the generic
functions in the standard library maps package or in
golang.org/x/exp/maps should be used.

Signed-off-by: Tobias Klauser <tobias@cilium.io>
  • Loading branch information
tklauser committed May 6, 2024
1 parent f726e13 commit 611dc2c
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,3 @@ func RequireRootPrivilege(cmd string) {
os.Exit(1)
}
}

// MapStringStructToSlice returns a slice with all keys of the given
// map[string]struct{}
func MapStringStructToSlice(m map[string]struct{}) []string {
s := make([]string, 0, len(m))
for k := range m {
s = append(s, k)
}
return s
}

0 comments on commit 611dc2c

Please sign in to comment.