From 0ec7d2b916fc88a4d5828a7a358292c3af0c074c Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Mon, 1 Nov 2021 16:34:57 +0200 Subject: [PATCH] Fix typos and grammar issues in comments (#495) --- action.go | 4 ++-- apps.go | 2 +- databases.go | 2 +- domains.go | 2 +- droplet_actions.go | 2 +- droplets.go | 2 +- godo.go | 2 +- image_actions.go | 2 +- keys.go | 2 +- kubernetes.go | 2 +- registry.go | 4 ++-- snapshots.go | 2 +- storage_actions.go | 2 +- util/droplet_test.go | 2 +- 14 files changed, 16 insertions(+), 16 deletions(-) diff --git a/action.go b/action.go index b74a2843..07ee9141 100644 --- a/action.go +++ b/action.go @@ -16,14 +16,14 @@ const ( ActionCompleted = "completed" ) -// ActionsService handles communction with action related methods of the +// ActionsService handles communication with action related methods of the // DigitalOcean API: https://docs.digitalocean.com/reference/api/api-reference/#tag/Actions type ActionsService interface { List(context.Context, *ListOptions) ([]Action, *Response, error) Get(context.Context, int) (*Action, *Response, error) } -// ActionsServiceOp handles communition with the image action related methods of the +// ActionsServiceOp handles communication with the image action related methods of the // DigitalOcean API. type ActionsServiceOp struct { client *Client diff --git a/apps.go b/apps.go index aa8ecfe8..df73752d 100644 --- a/apps.go +++ b/apps.go @@ -375,7 +375,7 @@ func (s *AppsServiceOp) ListInstanceSizes(ctx context.Context) ([]*AppInstanceSi return root.InstanceSizes, resp, nil } -// GetInstanceSize retreives information about a specific instance size for service, worker, and job components. +// GetInstanceSize retrieves information about a specific instance size for service, worker, and job components. func (s *AppsServiceOp) GetInstanceSize(ctx context.Context, slug string) (*AppInstanceSize, *Response, error) { path := fmt.Sprintf("%s/tiers/instance_sizes/%s", appsBasePath, slug) req, err := s.client.NewRequest(ctx, http.MethodGet, path, nil) diff --git a/databases.go b/databases.go index 74763ce8..6d0adbde 100644 --- a/databases.go +++ b/databases.go @@ -239,7 +239,7 @@ type DatabaseUpdateMaintenanceRequest struct { // DatabaseDB represents an engine-specific database created within a database cluster. For SQL // databases like PostgreSQL or MySQL, a "DB" refers to a database created on the RDBMS. For instance, -// a PostgreSQL database server can contain many database schemas, each with it's own settings, access +// a PostgreSQL database server can contain many database schemas, each with its own settings, access // permissions and data. ListDBs will return all databases present on the server. type DatabaseDB struct { Name string `json:"name"` diff --git a/domains.go b/domains.go index 9cd9bc16..6a86296c 100644 --- a/domains.go +++ b/domains.go @@ -53,7 +53,7 @@ type domainsRoot struct { Meta *Meta `json:"meta"` } -// DomainCreateRequest respresents a request to create a domain. +// DomainCreateRequest represents a request to create a domain. type DomainCreateRequest struct { Name string `json:"name"` IPAddress string `json:"ip_address,omitempty"` diff --git a/droplet_actions.go b/droplet_actions.go index d9e65bba..c1045cdf 100644 --- a/droplet_actions.go +++ b/droplet_actions.go @@ -7,7 +7,7 @@ import ( "net/url" ) -// ActionRequest reprents DigitalOcean Action Request +// ActionRequest represents DigitalOcean Action Request type ActionRequest map[string]interface{} // DropletActionsService is an interface for interfacing with the Droplet actions diff --git a/droplets.go b/droplets.go index ac2a1a69..9a484569 100644 --- a/droplets.go +++ b/droplets.go @@ -180,7 +180,7 @@ func (d DropletCreateImage) MarshalJSON() ([]byte, error) { // DropletCreateVolume identifies a volume to attach for the create request. type DropletCreateVolume struct { ID string - // Deprecated: You must pass a the volume's ID when creating a Droplet. + // Deprecated: You must pass the volume's ID when creating a Droplet. Name string } diff --git a/godo.go b/godo.go index d4a733ce..650db17e 100644 --- a/godo.go +++ b/godo.go @@ -369,7 +369,7 @@ func (c *Client) Do(ctx context.Context, req *http.Request, v interface{}) (*Res defer func() { // Ensure the response body is fully read and closed - // before we reconnect, so that we reuse the same TCPconnection. + // before we reconnect, so that we reuse the same TCPConnection. // Close the previous response's body. But read at least some of // the body so if it's small the underlying TCP connection will be // re-used. No need to check for errors: if it fails, the Transport diff --git a/image_actions.go b/image_actions.go index 08953f0b..8006b372 100644 --- a/image_actions.go +++ b/image_actions.go @@ -15,7 +15,7 @@ type ImageActionsService interface { Convert(context.Context, int) (*Action, *Response, error) } -// ImageActionsServiceOp handles communition with the image action related methods of the +// ImageActionsServiceOp handles communication with the image action related methods of the // DigitalOcean API. type ImageActionsServiceOp struct { client *Client diff --git a/keys.go b/keys.go index dec62a7b..d50946c2 100644 --- a/keys.go +++ b/keys.go @@ -117,7 +117,7 @@ func (s *KeysServiceOp) GetByID(ctx context.Context, keyID int) (*Key, *Response return s.get(ctx, path) } -// GetByFingerprint gets a Key by by fingerprint +// GetByFingerprint gets a Key by fingerprint func (s *KeysServiceOp) GetByFingerprint(ctx context.Context, fingerprint string) (*Key, *Response, error) { if len(fingerprint) < 1 { return nil, nil, NewArgError("fingerprint", "cannot not be empty") diff --git a/kubernetes.go b/kubernetes.go index 3abb9621..1a416136 100644 --- a/kubernetes.go +++ b/kubernetes.go @@ -474,7 +474,7 @@ type KubernetesAssociatedResources struct { LoadBalancers []*AssociatedResource `json:"load_balancers"` } -// AssociatedResource is the object to represent a Kubernetes cluster associated resource's Id and Name. +// AssociatedResource is the object to represent a Kubernetes cluster associated resource's ID and Name. type AssociatedResource struct { ID string `json:"id"` Name string `json:"name"` diff --git a/registry.go b/registry.go index dcd4fc75..63099f5c 100644 --- a/registry.go +++ b/registry.go @@ -167,8 +167,8 @@ type RegistrySubscriptionTier struct { IncludedBandwidthBytes uint64 `json:"included_bandwidth_bytes"` MonthlyPriceInCents uint64 `json:"monthly_price_in_cents"` Eligible bool `json:"eligible,omitempty"` - // EligibilityReaons is included when Eligible is false, and indicates the - // reasons why this tier is not availble to the user. + // EligibilityReasons is included when Eligible is false, and indicates the + // reasons why this tier is not available to the user. EligibilityReasons []string `json:"eligibility_reasons,omitempty"` } diff --git a/snapshots.go b/snapshots.go index bb1b99b0..13a06ca3 100644 --- a/snapshots.go +++ b/snapshots.go @@ -75,7 +75,7 @@ func (s *SnapshotsServiceOp) ListVolume(ctx context.Context, opt *ListOptions) ( return s.list(ctx, opt, &listOpt) } -// Get retrieves an snapshot by id. +// Get retrieves a snapshot by id. func (s *SnapshotsServiceOp) Get(ctx context.Context, snapshotID string) (*Snapshot, *Response, error) { return s.get(ctx, snapshotID) } diff --git a/storage_actions.go b/storage_actions.go index b88b18fe..49e30cfd 100644 --- a/storage_actions.go +++ b/storage_actions.go @@ -23,7 +23,7 @@ type StorageActionsServiceOp struct { client *Client } -// StorageAttachment represents the attachement of a block storage +// StorageAttachment represents the attachment of a block storage // volume to a specific Droplet under the device name. type StorageAttachment struct { DropletID int `json:"droplet_id"` diff --git a/util/droplet_test.go b/util/droplet_test.go index 823d3121..12272e02 100644 --- a/util/droplet_test.go +++ b/util/droplet_test.go @@ -21,7 +21,7 @@ func ExampleWaitForActive() { // create your droplet and retrieve the create action uri uri := "https://api.digitalocean.com/v2/actions/xxxxxxxx" - // block until until the action is complete + // block until the action is complete err := WaitForActive(ctx, client, uri) if err != nil { panic(err)