Skip to content

Commit

Permalink
refactor codes
Browse files Browse the repository at this point in the history
  • Loading branch information
lyt122 committed Jul 12, 2024
1 parent f239cf5 commit 75d00da
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
7 changes: 0 additions & 7 deletions plugins/plugins/casbin/filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
package casbin

import (
"sync"

"mosn.io/htnn/api/pkg/filtermanager/api"
)

Expand All @@ -34,11 +32,6 @@ type filter struct {
config *config
}

var (
Changed = false
ChangedMu sync.RWMutex
)

func (f *filter) DecodeHeaders(headers api.RequestHeaderMap, endStream bool) api.ResultAction {
conf := f.config
role, _ := headers.Get(conf.Token.Name) // role can be ""
Expand Down
1 change: 0 additions & 1 deletion plugins/plugins/casbin/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ func TestCasbin(t *testing.T) {
assert.Equal(t, tt.status, 0)
} else {
assert.Equal(t, tt.status, lr.Code)
assert.False(t, Changed)
}
wg.Done()
}()
Expand Down

0 comments on commit 75d00da

Please sign in to comment.