git » gofer » commit 7f213fe

Fix typos in documentation and comments

author Alberto Bertogli
2023-10-07 12:07:50 UTC
committer Alberto Bertogli
2023-10-07 12:07:50 UTC
parent 6d43dfffec7f0f997f8fec5d3b49857d8b7034c5

Fix typos in documentation and comments

ipratelimit/ipratelimit.go +1 -1
nettrace/trace.go +1 -1
test/01-fe.yaml +1 -1
test/test.sh +1 -1

diff --git a/ipratelimit/ipratelimit.go b/ipratelimit/ipratelimit.go
index cf867bd..7937ed8 100644
--- a/ipratelimit/ipratelimit.go
+++ b/ipratelimit/ipratelimit.go
@@ -443,6 +443,6 @@ func makeMiniTime(t time.Time) miniTime {
 }
 
 func sinceMiniTime(now time.Time, old miniTime) time.Duration {
-	// time.Duration is an int64 nanosecond count, so we can just substract.
+	// time.Duration is an int64 nanosecond count, so we can just subtract.
 	return time.Duration(now.UnixNano() - int64(old))
 }
diff --git a/nettrace/trace.go b/nettrace/trace.go
index 7013e48..700d6ff 100644
--- a/nettrace/trace.go
+++ b/nettrace/trace.go
@@ -301,7 +301,7 @@ func (tr *trace) IsError() bool {
 // We keep this many buckets of finished traces.
 const nBuckets = 8
 
-// Buckets to use. Lenght must match nBuckets.
+// Buckets to use. Length must match nBuckets.
 // "Traces with a latency >= $duration".
 var buckets = []time.Duration{
 	time.Duration(0),
diff --git a/test/01-fe.yaml b/test/01-fe.yaml
index e0cf146..a96a406 100644
--- a/test/01-fe.yaml
+++ b/test/01-fe.yaml
@@ -14,7 +14,7 @@ _routes: &routes
     proxy: "http://localhost:8450/cgi/?x=1&y=2"
   "/status/":
     proxy: "http://localhost:8450/status/"
-  "/bad/unreacheable":
+  "/bad/unreachable":
     proxy: "http://localhost:1/"
   "/bad/empty":
     proxy: "http:"
diff --git a/test/test.sh b/test/test.sh
index c8309c0..5da5641 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -136,7 +136,7 @@ do
 	exp $base/gogo/gaga -status 307 -redir https://google.com/gaga
 	exp $base/gogo/a/b/ -status 307 -redir https://google.com/a/b/
 
-	exp $base/bad/unreacheable -status 502
+	exp $base/bad/unreachable -status 502
 	exp $base/bad/empty -status 502
 
 	exp $base/status/543 -status 543