Skip to content

Commit

Permalink
Fix naming conventions
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalMinder committed Mar 14, 2021
1 parent 9629fa8 commit 23fe2de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion geoblock.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package geoblock a Traefik plugin to block requests based on their country of origin.
package geoblock
package GeoBlock

import (
"context"
Expand Down
12 changes: 6 additions & 6 deletions geoblock_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package geoblock_test
package GeoBlock_test

import (
"context"
"net/http"
"net/http/httptest"
"testing"

geoblock "github.com/PascalMinder/GeoBlock"
GeoBlock "github.com/PascalMinder/GeoBlock"
)

const (
Expand All @@ -16,14 +16,14 @@ const (
)

func TestAllowedContry(t *testing.T) {
cfg := geoblock.CreateConfig()
cfg := GeoBlock.CreateConfig()

cfg.Countries = append(cfg.Countries, "CH")

ctx := context.Background()
next := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {})

handler, err := geoblock.New(ctx, next, cfg, "GeoBlock")
handler, err := GeoBlock.New(ctx, next, cfg, "GeoBlock")
if err != nil {
t.Fatal(err)
}
Expand All @@ -43,14 +43,14 @@ func TestAllowedContry(t *testing.T) {
}

func TestDeniedContry(t *testing.T) {
cfg := geoblock.CreateConfig()
cfg := GeoBlock.CreateConfig()

cfg.Countries = append(cfg.Countries, "CH")

ctx := context.Background()
next := http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {})

handler, err := geoblock.New(ctx, next, cfg, "GeoBlock")
handler, err := GeoBlock.New(ctx, next, cfg, "GeoBlock")
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 23fe2de

Please sign in to comment.