Fix typos and grammar issues in comments (#495)
This commit is contained in:
parent
2a6fa2be2b
commit
0ec7d2b916
|
@ -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
|
||||
|
|
2
apps.go
2
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)
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
2
godo.go
2
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
|
||||
|
|
|
@ -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
|
||||
|
|
2
keys.go
2
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")
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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"`
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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"`
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue