From 2e79181430fa3add06282a7f058dacece112b92f Mon Sep 17 00:00:00 2001 From: eveneast Date: Mon, 15 Apr 2024 15:19:42 +0800 Subject: [PATCH] Fix some typos in comments Signed-off-by: eveneast --- README.md | 2 +- link.go | 2 +- stream/io_chan_test.go | 2 +- toxics/timeout_test.go | 4 ++-- toxics/toxic.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6e5676f8..89f0b831 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,7 @@ Toxiproxy for Windows is available for download at https://github.com/Shopify/to **Docker** Toxiproxy is available on [Github container registry](https://github.com/Shopify/toxiproxy/pkgs/container/toxiproxy). -Old versions `<= 2.1.4` are available on on [Docker Hub](https://hub.docker.com/r/shopify/toxiproxy/). +Old versions `<= 2.1.4` are available on [Docker Hub](https://hub.docker.com/r/shopify/toxiproxy/). ```bash $ docker pull ghcr.io/shopify/toxiproxy diff --git a/link.go b/link.go index 03ae9d56..73e3976c 100644 --- a/link.go +++ b/link.go @@ -232,7 +232,7 @@ func (link *ToxicLink) RemoveToxic(ctx context.Context, toxic *toxics.ToxicWrapp }(link.stubs[toxic_index-1], stop) // Unblock the previous toxic if it is trying to flush - // If the previous toxic is closed, continue flusing until we reach the end. + // If the previous toxic is closed, continue flushing until we reach the end. interrupted := false stopped := false for !interrupted { diff --git a/stream/io_chan_test.go b/stream/io_chan_test.go index 7559cf6b..415ac779 100644 --- a/stream/io_chan_test.go +++ b/stream/io_chan_test.go @@ -202,7 +202,7 @@ func TestStream_ReadInterrupt(t *testing.T) { } if n != 0 { - t.Fatalf("Read still returned data after interrput: %d bytes", n) + t.Fatalf("Read still returned data after interrupt: %d bytes", n) } // Try writing again after the channel was interrupted diff --git a/toxics/timeout_test.go b/toxics/timeout_test.go index 2321154b..849a84e3 100644 --- a/toxics/timeout_test.go +++ b/toxics/timeout_test.go @@ -106,11 +106,11 @@ func TestTimeoutToxicClosesConnectionOnRemove(t *testing.T) { buf := make([]byte, 1) _, err := conn.Read(buf) if err != io.EOF { - t.Fatal("expected EOF from closed connetion") + t.Fatal("expected EOF from closed connection") } _, err = serverConn.Read(buf) if err != io.EOF { - t.Fatal("expected EOF from closed server connetion") + t.Fatal("expected EOF from closed server connection") } }) if err != nil { diff --git a/toxics/toxic.go b/toxics/toxic.go index df4d6716..36516ccc 100644 --- a/toxics/toxic.go +++ b/toxics/toxic.go @@ -10,7 +10,7 @@ import ( "github.com/Shopify/toxiproxy/v2/stream" ) -// A Toxic is something that can be attatched to a link to modify the way +// A Toxic is something that can be attached to a link to modify the way // data can be passed through (for example, by adding latency) // // Toxic