From: Ward Vandewege Date: Sun, 8 Nov 2020 21:41:21 +0000 (-0500) Subject: Fix more golint warnings. X-Git-Tag: 2.2.0~233 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/8e60faf420f02d750bbaf7792343a95d2c2674ae Fix more golint warnings. No issue # Arvados-DCO-1.1-Signed-off-by: Ward Vandewege --- diff --git a/lib/boot/supervisor.go b/lib/boot/supervisor.go index 3484a1444e..1e8e83ff3b 100644 --- a/lib/boot/supervisor.go +++ b/lib/boot/supervisor.go @@ -438,9 +438,9 @@ func (super *Supervisor) lookPath(prog string) string { return prog } -// Run prog with args, using dir as working directory. If ctx is -// cancelled while the child is running, RunProgram terminates the -// child, waits for it to exit, then returns. +// RunProgram runs prog with args, using dir as working directory. If ctx is +// cancelled while the child is running, RunProgram terminates the child, waits +// for it to exit, then returns. // // Child's environment will have our env vars, plus any given in env. // diff --git a/lib/controller/api/routable.go b/lib/controller/api/routable.go index 3003ea2df7..f887448829 100644 --- a/lib/controller/api/routable.go +++ b/lib/controller/api/routable.go @@ -18,7 +18,7 @@ type RoutableFunc func(ctx context.Context, opts interface{}) (interface{}, erro type RoutableFuncWrapper func(RoutableFunc) RoutableFunc -// ComposeWrappers(w1, w2, w3, ...) returns a RoutableFuncWrapper that +// ComposeWrappers (w1, w2, w3, ...) returns a RoutableFuncWrapper that // composes w1, w2, w3, ... such that w1 is the outermost wrapper. func ComposeWrappers(wraps ...RoutableFuncWrapper) RoutableFuncWrapper { return func(f RoutableFunc) RoutableFunc { diff --git a/lib/controller/railsproxy/railsproxy.go b/lib/controller/railsproxy/railsproxy.go index ff9de36b75..515dd5df0f 100644 --- a/lib/controller/railsproxy/railsproxy.go +++ b/lib/controller/railsproxy/railsproxy.go @@ -15,8 +15,7 @@ import ( "git.arvados.org/arvados.git/sdk/go/arvados" ) -// For now, FindRailsAPI always uses the rails API running on this -// node. +// FindRailsAPI always uses the rails API running on this node, for now. func FindRailsAPI(cluster *arvados.Cluster) (*url.URL, bool, error) { var best *url.URL for target := range cluster.Services.RailsAPI.InternalURLs { diff --git a/sdk/go/arvados/container.go b/sdk/go/arvados/container.go index 3d08f2235a..265944e81d 100644 --- a/sdk/go/arvados/container.go +++ b/sdk/go/arvados/container.go @@ -32,7 +32,7 @@ type Container struct { FinishedAt *time.Time `json:"finished_at"` // nil if not yet finished } -// Container is an arvados#container resource. +// ContainerRequest is an arvados#container_request resource. type ContainerRequest struct { UUID string `json:"uuid"` OwnerUUID string `json:"owner_uuid"` @@ -127,7 +127,7 @@ const ( ContainerStateCancelled = ContainerState("Cancelled") ) -// ContainerState is a string corresponding to a valid Container state. +// ContainerRequestState is a string corresponding to a valid Container Request state. type ContainerRequestState string const ( diff --git a/services/keepstore/keepstore.go b/services/keepstore/keepstore.go index f2973b586a..3c9d5d15e8 100644 --- a/services/keepstore/keepstore.go +++ b/services/keepstore/keepstore.go @@ -8,10 +8,10 @@ import ( "time" ) -// A Keep "block" is 64MB. +// BlockSize for a Keep "block" is 64MB. const BlockSize = 64 * 1024 * 1024 -// A Keep volume must have at least MinFreeKilobytes available +// MinFreeKilobytes is the amount of space a Keep volume must have available // in order to permit writes. const MinFreeKilobytes = BlockSize / 1024