Skip to content

Commit 7e79ef7

Browse files
committed
fix package name
1 parent ac86213 commit 7e79ef7

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.traefik.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type: middleware
33

44
import: github.com/sproutmaster/TraefikIPRules
55

6-
summary: 'IPRules is a middleware plugin which accepts IP addresses or IP address ranges, and accepts or blocks requests originating from those IPs.'
6+
summary: 'TraefikIPRules is a middleware plugin which accepts IP addresses or IP address ranges, and accepts or blocks requests originating from those IPs.'
77

88
testData:
99
denyList:

ipRule.go renamed to traefikiprules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package ipRule
1+
package traefikiprules
22

33
import (
44
"context"

ipRule_test.go renamed to traefikiprules_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
package ipRule_test
1+
package traefikiprules_test
22

33
import (
4-
ipRule "TraefikIPRules"
54
"context"
5+
traefikiprules "github.com/sproutmaster/TraefikIPRules"
66
"github.com/stretchr/testify/assert"
77
"github.com/stretchr/testify/require"
88
"net/http"
@@ -52,14 +52,14 @@ func TestNew(t *testing.T) {
5252
t.Run(test.desc, func(t *testing.T) {
5353
t.Parallel()
5454

55-
cfg := ipRule.CreateConfig()
55+
cfg := traefikiprules.CreateConfig()
5656
cfg.DenyList = test.denyList
5757
cfg.AllowList = test.allowList
5858

5959
ctx := context.Background()
6060
next := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {})
6161

62-
handler, err := ipRule.New(ctx, next, cfg, "ipRule plugin")
62+
handler, err := traefikiprules.New(ctx, next, cfg, "ipRule plugin")
6363

6464
if test.expectedError {
6565
assert.Error(t, err)
@@ -158,15 +158,15 @@ func TestServeHTTP(t *testing.T) {
158158
t.Run(test.desc, func(t *testing.T) {
159159
t.Parallel()
160160

161-
cfg := ipRule.CreateConfig()
161+
cfg := traefikiprules.CreateConfig()
162162
cfg.DenyList = test.denyList
163163
cfg.AllowList = test.allowList
164164

165165
ctx := context.Background()
166166
next := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {})
167167
recorder := httptest.NewRecorder()
168168

169-
handler, err := ipRule.New(ctx, next, cfg, "ip-processor-plugin")
169+
handler, err := traefikiprules.New(ctx, next, cfg, "ip-processor-plugin")
170170
require.NoError(t, err)
171171

172172
req, err := http.NewRequestWithContext(ctx, http.MethodGet, "http://localhost", nil)
@@ -186,7 +186,7 @@ func TestServeHTTP(t *testing.T) {
186186
}
187187

188188
func TestCreateConfig(t *testing.T) {
189-
cfg := ipRule.CreateConfig()
189+
cfg := traefikiprules.CreateConfig()
190190
assert.NotNil(t, cfg)
191191
assert.Empty(t, cfg.DenyList)
192192
assert.Empty(t, cfg.AllowList)

0 commit comments

Comments
 (0)