From 7a05a4326f75ad478ad72904d8d1aaf06d5ab57a Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 6 Mar 2023 08:58:07 +0200 Subject: [PATCH] proc,terminal: remove unused unexported functions (#3299) --- pkg/proc/proc_test.go | 9 --------- pkg/terminal/command_test.go | 13 ------------- 2 files changed, 22 deletions(-) diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go index 013d1c83..61df0f78 100644 --- a/pkg/proc/proc_test.go +++ b/pkg/proc/proc_test.go @@ -2832,15 +2832,6 @@ func TestNextInDeferReturn(t *testing.T) { }) } -func getg(goid int64, gs []*proc.G) *proc.G { - for _, g := range gs { - if g.ID == goid { - return g - } - } - return nil -} - func TestAttachDetach(t *testing.T) { if testBackend == "lldb" && runtime.GOOS == "linux" { bs, _ := ioutil.ReadFile("/proc/sys/kernel/yama/ptrace_scope") diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go index d7209576..ee9c6051 100644 --- a/pkg/terminal/command_test.go +++ b/pkg/terminal/command_test.go @@ -559,19 +559,6 @@ func TestOnPrefixLocals(t *testing.T) { }) } -func countOccurrences(s, needle string) int { - count := 0 - for { - idx := strings.Index(s, needle) - if idx < 0 { - break - } - count++ - s = s[idx+len(needle):] - } - return count -} - func listIsAt(t *testing.T, term *FakeTerminal, listcmd string, cur, start, end int) { t.Helper() outstr := term.MustExec(listcmd)