Skip to content

Commit

Permalink
Fix typos and grammar issues in comments (digitalocean#495)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear authored Nov 1, 2021
1 parent 2a6fa2b commit 0ec7d2b
Show file tree
Hide file tree
Showing 14 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions action.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion databases.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion droplet_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion droplets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion godo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion image_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
4 changes: 2 additions & 2 deletions registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
2 changes: 1 addition & 1 deletion snapshots.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
2 changes: 1 addition & 1 deletion storage_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 1 addition & 1 deletion util/droplet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0ec7d2b

Please sign in to comment.