diff --git a/flowrate/flowcontrol.go b/flowrate/flowrate.go similarity index 98% rename from flowrate/flowcontrol.go rename to flowrate/flowrate.go index 40db5d89e..1b727721e 100644 --- a/flowrate/flowcontrol.go +++ b/flowrate/flowrate.go @@ -2,9 +2,9 @@ // Written by Maxim Khitrov (November 2012) // -// Package flowcontrol provides the tools for monitoring and limiting the -// transfer rate of an arbitrary data stream. -package flowcontrol +// Package flowrate provides the tools for monitoring and limiting the flow rate +// of an arbitrary data stream. +package flowrate import ( "math" diff --git a/flowrate/io.go b/flowrate/io.go index 12a753ddf..fbe090972 100644 --- a/flowrate/io.go +++ b/flowrate/io.go @@ -2,7 +2,7 @@ // Written by Maxim Khitrov (November 2012) // -package flowcontrol +package flowrate import ( "errors" @@ -11,7 +11,7 @@ import ( // ErrLimit is returned by the Writer when a non-blocking write is short due to // the transfer rate limit. -var ErrLimit = errors.New("flowcontrol: transfer rate limit exceeded") +var ErrLimit = errors.New("flowrate: flow rate limit exceeded") // Limiter is implemented by the Reader and Writer to provide a consistent // interface for monitoring and controlling data transfer. diff --git a/flowrate/io_test.go b/flowrate/io_test.go index 318069366..fa7f4b4ae 100644 --- a/flowrate/io_test.go +++ b/flowrate/io_test.go @@ -2,7 +2,7 @@ // Written by Maxim Khitrov (November 2012) // -package flowcontrol +package flowrate import ( "bytes" diff --git a/flowrate/util.go b/flowrate/util.go index 91efd8815..4caac583f 100644 --- a/flowrate/util.go +++ b/flowrate/util.go @@ -2,7 +2,7 @@ // Written by Maxim Khitrov (November 2012) // -package flowcontrol +package flowrate import ( "math"