portlist: unexport SameInodes method

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
This commit is contained in:
Brad Fitzpatrick 2021-04-09 15:16:36 -07:00
parent 3167e55ddf
commit 5c5acadb2a
3 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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
}

View File

@ -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)
}