From 5c5acadb2a6530105d2bbde77ee7c55b8388af23 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Fri, 9 Apr 2021 15:16:36 -0700 Subject: [PATCH] portlist: unexport SameInodes method Signed-off-by: Brad Fitzpatrick --- portlist/poller.go | 2 +- portlist/portlist.go | 4 ++-- portlist/portlist_test.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/portlist/poller.go b/portlist/poller.go index 9e98022b1..e417419d2 100644 --- a/portlist/poller.go +++ b/portlist/poller.go @@ -81,7 +81,7 @@ func (p *Poller) Run(ctx context.Context) error { p.Err = err return err } - if pl.SameInodes(p.prev) { + if pl.sameInodes(p.prev) { continue } p.prev = pl diff --git a/portlist/portlist.go b/portlist/portlist.go index 521edcf49..3b9d6d76c 100644 --- a/portlist/portlist.go +++ b/portlist/portlist.go @@ -48,7 +48,7 @@ func (a *Port) lessThan(b *Port) bool { return false } -func (a List) SameInodes(b List) bool { +func (a List) sameInodes(b List) bool { if a == nil || b == nil || len(a) != len(b) { return false } @@ -76,7 +76,7 @@ func GetList(prev List) (List, error) { if err != nil { return nil, fmt.Errorf("listPorts: %s", err) } - if pl.SameInodes(prev) { + if pl.sameInodes(prev) { // Nothing changed, skip inode lookup return prev, nil } diff --git a/portlist/portlist_test.go b/portlist/portlist_test.go index 7977303a7..f2595d369 100644 --- a/portlist/portlist_test.go +++ b/portlist/portlist_test.go @@ -185,7 +185,7 @@ func TestSameInodes(t *testing.T) { }, } for _, tt := range tests { - got := tt.a.SameInodes(tt.b) + got := tt.a.sameInodes(tt.b) if got != tt.want { t.Errorf("%s: Equal = %v; want %v", tt.name, got, tt.want) }