Skip to content

Commit

Permalink
Fixed spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
evg4b committed Jul 16, 2022
1 parent d4ab44a commit 593d4a6
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions cmd/uncors/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"net/http"
"strconv"

"github.com/evg4b/uncors/internal/infrastrucure"
"github.com/evg4b/uncors/internal/infrastructure"
"github.com/evg4b/uncors/internal/processor"
"github.com/evg4b/uncors/internal/proxy"
"github.com/evg4b/uncors/internal/urlreplacer"
Expand Down Expand Up @@ -58,7 +58,7 @@ func main() {
pterm.Println()
pterm.Info.Printfln("PROXY: %s => %s", *source, *target)

http.HandleFunc("/", infrastrucure.NormalizeHttpReqDecorator(rp.HandleRequest))
http.HandleFunc("/", infrastructure.NormalizeHttpReqDecorator(rp.HandleRequest))
addr := net.JoinHostPort("0.0.0.0", strconv.Itoa(*port))
if err = http.ListenAndServe(addr, nil); err != nil {
pterm.Fatal.Println(err)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package infrastrucure
package infrastructure

import "net/http"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package infrastrucure
package infrastructure

import "net/http"

Expand Down
6 changes: 3 additions & 3 deletions internal/processor/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (
"fmt"
"net/http"

"github.com/evg4b/uncors/internal/infrastrucure"
"github.com/evg4b/uncors/internal/infrastructure"
"github.com/pterm/pterm"
)

type HandlingMiddleware interface {
Wrap(next infrastrucure.HandlerFunc) infrastrucure.HandlerFunc
Wrap(next infrastructure.HandlerFunc) infrastructure.HandlerFunc
}

type RequestProcessor struct {
handlerFunc infrastrucure.HandlerFunc
handlerFunc infrastructure.HandlerFunc
}

func NewRequestProcessor(options ...requestProcessorOption) *RequestProcessor {
Expand Down
4 changes: 2 additions & 2 deletions internal/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"io"
"net/http"

"github.com/evg4b/uncors/internal/infrastrucure"
"github.com/evg4b/uncors/internal/infrastructure"
"github.com/evg4b/uncors/internal/responceprinter"
"github.com/evg4b/uncors/internal/urlreplacer"
"github.com/pterm/pterm"
Expand All @@ -25,7 +25,7 @@ func NewProxyHandlingMiddleware(options ...proxyMiddlewareOptions) *ProxyMiddlew
return middleware
}

func (pm *ProxyMiddleware) Wrap(next infrastrucure.HandlerFunc) infrastrucure.HandlerFunc {
func (pm *ProxyMiddleware) Wrap(next infrastructure.HandlerFunc) infrastructure.HandlerFunc {
proxyWriter := pterm.PrefixPrinter{
MessageStyle: &pterm.ThemeDefault.InfoMessageStyle,
Prefix: pterm.Prefix{
Expand Down
24 changes: 12 additions & 12 deletions testing/mocks/handling_middleware_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions testing/testutils/middleware_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"testing"

"github.com/evg4b/uncors/internal/infrastrucure"
"github.com/evg4b/uncors/internal/infrastructure"
"github.com/evg4b/uncors/internal/processor"
"github.com/evg4b/uncors/testing/mocks"
)
Expand All @@ -23,7 +23,7 @@ func NewMidelwaresTracker(t *testing.T) *midelwaresTracker {

func (t *midelwaresTracker) MakeMidelware(name string) processor.HandlingMiddleware {
return mocks.NewHandlingMiddlewareMock(t.t).WrapMock.
Set(func(next infrastrucure.HandlerFunc) (h1 infrastrucure.HandlerFunc) {
Set(func(next infrastructure.HandlerFunc) (h1 infrastructure.HandlerFunc) {
return func(w http.ResponseWriter, r *http.Request) error {
t.CallsOrder = append(t.CallsOrder, name)
return next(w, r)
Expand All @@ -33,7 +33,7 @@ func (t *midelwaresTracker) MakeMidelware(name string) processor.HandlingMiddlew

func (t *midelwaresTracker) MakeFinalMidelware(name string) processor.HandlingMiddleware {
return mocks.NewHandlingMiddlewareMock(t.t).WrapMock.
Set(func(next infrastrucure.HandlerFunc) (h1 infrastrucure.HandlerFunc) {
Set(func(next infrastructure.HandlerFunc) (h1 infrastructure.HandlerFunc) {
return func(w http.ResponseWriter, r *http.Request) error {
t.CallsOrder = append(t.CallsOrder, name)
return nil
Expand Down

0 comments on commit 593d4a6

Please sign in to comment.