Skip to content

Commit

Permalink
Fixup typos in SDK documentation and examples. (#3469)
Browse files Browse the repository at this point in the history
Fixes several typos in the SDK documentation and examples.
  • Loading branch information
kataras authored Aug 10, 2020
1 parent 8292c56 commit 375b496
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 26 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
with:
# Setting messages to an empty string will cause the automation to skip
# that category
ancient-issue-message: We have noticed this issue has not recieved attention in 3 years. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
stale-issue-message: This issue has not recieved a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.
ancient-issue-message: We have noticed this issue has not received attention in 3 years. We will close this issue for now. If you think this is in error, please feel free to comment and reopen the issue.
stale-issue-message: This issue has not received a response in 1 week. If you want to keep this issue open, please just leave a comment below and auto-close will be canceled.

# These labels are required
stale-issue-label: closing-soon
Expand Down
8 changes: 4 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6274,7 +6274,7 @@ Release v1.14.19 (2018-07-03)
* Feature 1 - On-demand cluster release version - When Amazon Redshift releases a new cluster version, you can choose to upgrade to that version immediately instead of waiting until your next maintenance window. You can also choose to roll back to a previous version. The two new APIs added for managing cluster release version are - ModifyClusterDbRevision, DescribeClusterDbRevisions. Feature 2 - Upgradeable reserved instance - You can now exchange one Reserved Instance for a new Reserved Instance with no changes to the terms of your existing Reserved Instance (term, payment type, or number of nodes). The two new APIs added for managing these upgrades are - AcceptReservedNodeExchange, GetReservedNodeExchangeOfferings.

### SDK Enhancements
* `private/model/api`: Add EventStream support over RPC protocl ([#1998](https://github.com/aws/aws-sdk-go/pull/1998))
* `private/model/api`: Add EventStream support over RPC protocol ([#1998](https://github.com/aws/aws-sdk-go/pull/1998))
* Adds support for EventStream over JSON PRC protocol. This adds support for the EventStream's initial-response event, EventStream headers, and EventStream modeled exceptions. Also replaces the hand written tests with generated tests for EventStream usage.

Release v1.14.18 (2018-07-02)
Expand Down Expand Up @@ -6484,7 +6484,7 @@ Release v1.14.0 (2018-06-04)

### SDK Features
* Add support for EventStream based APIs (S3 SelectObjectContent) ([#1941](https://github.com/aws/aws-sdk-go/pull/1941))
* Adds support for EventStream asynchronous APIs such as S3 SelectObjectContents API. This API allows your application to receiving multiple events asynchronously from the API response. Your application recieves these events from a channel on the API response.
* Adds support for EventStream asynchronous APIs such as S3 SelectObjectContents API. This API allows your application to receiving multiple events asynchronously from the API response. Your application receives these events from a channel on the API response.
* See PR [#1941](https://github.com/aws/aws-sdk-go/pull/1941) for example.
* Fixes [#1895](https://github.com/aws/aws-sdk-go/issues/1895)

Expand Down Expand Up @@ -9059,7 +9059,7 @@ Release v1.8.8 (2017-04-04)

### Service Client Updates
* `service/cloudwatch`: Updates service API, documentation, and paginators
* Amazon Web Services announced the immediate availability of two additional alarm configuration rules for Amazon CloudWatch Alarms. The first rule is for configuring missing data treatment. Customers have the options to treat missing data as alarm threshold breached, alarm threshold not breached, maintain alarm state and the current default treatment. The second rule is for alarms based on percentiles metrics that can trigger unnecassarily if the percentile is calculated from a small number of samples. The new rule can treat percentiles with low sample counts as same as missing data. If the first rule is enabled, the same treatment will be applied when an alarm encounters a percentile with low sample counts.
* Amazon Web Services announced the immediate availability of two additional alarm configuration rules for Amazon CloudWatch Alarms. The first rule is for configuring missing data treatment. Customers have the options to treat missing data as alarm threshold breached, alarm threshold not breached, maintain alarm state and the current default treatment. The second rule is for alarms based on percentiles metrics that can trigger unnecessarily if the percentile is calculated from a small number of samples. The new rule can treat percentiles with low sample counts as same as missing data. If the first rule is enabled, the same treatment will be applied when an alarm encounters a percentile with low sample counts.

Release v1.8.7 (2017-04-03)
===
Expand Down Expand Up @@ -9187,7 +9187,7 @@ SDK Features
SDK Enhancements
---
* `aws/signer/v4`: Adds support for unsigned payload signer config (#1130)
* Adds configuration option to the v4.Signer to specify the request's body should not be signed. This will only correclty function on services that support unsigned payload. e.g. S3, Glacier.
* Adds configuration option to the v4.Signer to specify the request's body should not be signed. This will only correctly function on services that support unsigned payload. e.g. S3, Glacier.

SDK Bug Fixes
---
Expand Down
2 changes: 1 addition & 1 deletion aws/request/request_retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestShouldRetry(t *testing.T) {
}
origError := awserr.New("ErrorTestShouldRetry", "Test should retry when error received", &urlError).OrigErr()
if e, a := true, shouldRetryError(origError); e != a {
t.Errorf("Expected to return %v to retry when error occured, got %v instead", e, a)
t.Errorf("Expected to return %v to retry when error occurred, got %v instead", e, a)
}

}
Expand Down
2 changes: 1 addition & 1 deletion awstesting/integration/performance/s3GetObject/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (c *Config) SetupFlags(prefix string, flagset *flag.FlagSet) {
flagset.DurationVar(&c.RequestDelay, "delay", 0,
"The detail between sequential requests.")
flagset.StringVar(&c.Endpoint, prefix+"endpoint", "",
"Optional overriden endpoint S3 client will connect to.")
"Optional overridden endpoint S3 client will connect to.")
flagset.StringVar(&c.Bucket, "bucket", "",
"The S3 bucket `name` to request the object from.")
flagset.StringVar(&c.Key, "key", "",
Expand Down
2 changes: 1 addition & 1 deletion example/aws/request/httptrace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Message: second
Attempt: 0, Latency: 101.836442ms, Sign: 122.098µs, Send: 101.517516ms, Unmarshal: 191.31µs, WillRetry: false,
HTTP: Latency: 101.518147ms, ConnReused: true, GetConn: 38.265µs, WriteRequest: 178.058µs, WaitResponseFirstByte: 101.457147ms, ReadResponseHeader: 60.526µs,
Message: thrid
Message: third
2020/07/21 15:39:10 Latency: 32.373919ms, Validate: 2.998µs, Build: 39.136µs, Attempts: 1,
Attempt: 0, Latency: 32.295677ms, Sign: 104.978µs, Send: 32.040306ms, Unmarshal: 146.096µs, WillRetry: false,
HTTP: Latency: 32.04078ms, ConnReused: true, GetConn: 33.36µs, WriteRequest: 166.508µs, WaitResponseFirstByte: 31.980933ms, ReadResponseHeader: 59.235µs,
Expand Down
2 changes: 1 addition & 1 deletion example/aws/request/httptrace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type HTTPLatency struct {
ReadBody time.Duration
}

// RequestTrace provides the strucutre to store SDK request attempt latencies.
// RequestTrace provides the structure to store SDK request attempt latencies.
// Use TraceRequest as a API operation request option to capture trace metrics
// for the individual request.
type RequestTrace struct {
Expand Down
2 changes: 1 addition & 1 deletion example/service/ecr/createRepository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The example creates the repository name provided in the first parameter on defau
go run -tags example createRepository.go <repo_name>
```

To create a repository in a diferent region, set `AWS_REGION` env var.
To create a repository in a different region, set `AWS_REGION` env var.

```sh
AWS_REGION=us-west-2 go -tags example run createRepository.go <repo_name>
Expand Down
6 changes: 3 additions & 3 deletions example/service/ecr/createRepository/createRepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/aws/aws-sdk-go/service/ecr"
)

const DEAFULT_AWS_REGION = "us-east-1"
const DEFAULT_AWS_REGION = "us-east-1"

// This example creates a new ECR Repository
//
Expand Down Expand Up @@ -54,11 +54,11 @@ func getRepoNameArg() string {
return firstArg
}

// Returns the aws region from env var or default region defined in DEAFULT_AWS_REGION constant
// Returns the aws region from env var or default region defined in DEFAULT_AWS_REGION constant
func getAwsRegion() string {
awsRegion := os.Getenv("AWS_REGION")
if awsRegion != "" {
return awsRegion
}
return DEAFULT_AWS_REGION
return DEFAULT_AWS_REGION
}
2 changes: 1 addition & 1 deletion example/service/ecr/deleteRepository/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The example deletes the repository name provided in the first parameter from def
go run -tags example deleteRepository.go <repo_name>
```

To delete a repository from a diferent region, set `AWS_REGION` env var.
To delete a repository from a different region, set `AWS_REGION` env var.

```sh
AWS_REGION=us-west-2 go run -tags example deleteRepository.go <repo_name>
Expand Down
8 changes: 4 additions & 4 deletions example/service/ecr/deleteRepository/deleteRepository.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/aws/aws-sdk-go/service/ecr"
)

const DEAFULT_AWS_REGION = "us-east-1"
const DEFAULT_AWS_REGION = "us-east-1"

// This example deletes an ECR Repository
//
Expand All @@ -30,7 +30,7 @@ func main() {
Force: aws.Bool(false),
RepositoryName: aws.String(repoName),
}

output, err := svc.DeleteRepository(input)
if err != nil {
fmt.Printf("\nError deleting the repo %v in region %v\n%v\n", repoName, aws.StringValue(config.Region), err.Error())
Expand All @@ -55,11 +55,11 @@ func getRepoNameArg() string {
return firstArg
}

// Returns the aws region from env var or default region defined in DEAFULT_AWS_REGION constant
// Returns the aws region from env var or default region defined in DEFAULT_AWS_REGION constant
func getAwsRegion() string {
awsRegion := os.Getenv("AWS_REGION")
if awsRegion != "" {
return awsRegion
}
return DEAFULT_AWS_REGION
return DEFAULT_AWS_REGION
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,5 @@ func main() {
}

fmt.Println()
log.Println("File downloaded! Avaliable at:", filename)
log.Println("File downloaded! Available at:", filename)
}
2 changes: 1 addition & 1 deletion private/protocol/rest/build_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestMarshalPath(t *testing.T) {

req := &request.Request{
HTTPRequest: &http.Request{
URL: &url.URL{Scheme: "https", Host: "exmaple.com", Path: "/{bucket}/{key+}"},
URL: &url.URL{Scheme: "https", Host: "example.com", Path: "/{bucket}/{key+}"},
},
Params: &in,
}
Expand Down
6 changes: 3 additions & 3 deletions service/s3/s3crypto/aes_gcm_content_cipher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ func TestGcmContentCipherBuilder_isFixtureEncryptionCompatible(t *testing.T) {
}

if err := features.isEncryptionVersionCompatible(v1ClientVersion); err != nil {
t.Errorf("expected to recieve no error, got %v", err)
t.Errorf("expected to receive no error, got %v", err)
}

if err := features.isEncryptionVersionCompatible(v2ClientVersion); err == nil {
t.Errorf("expected to recieve error, got nil")
t.Errorf("expected to receive error, got nil")
}
}

Expand All @@ -70,7 +70,7 @@ func TestGcmContentCipherBuilderV2_isFixtureEncryptionCompatible(t *testing.T) {
}

if err := features.isEncryptionVersionCompatible(v2ClientVersion); err != nil {
t.Errorf("expected to recieve no error, got %v", err)
t.Errorf("expected to receive no error, got %v", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion service/s3/s3crypto/encryption_client_v2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestNewEncryptionClientV2_NonDefaults(t *testing.T) {
}

// cdgWithStaticTestIV is a test structure that wraps a CipherDataGeneratorWithCEKAlg and stubs in a static IV
// so that encryption tests can be guranteed to be consistent.
// so that encryption tests can be guaranteed to be consistent.
type cdgWithStaticTestIV struct {
IV []byte
CipherDataGeneratorWithCEKAlg
Expand Down
2 changes: 1 addition & 1 deletion service/s3/sse.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func computeKeyMD5(keyHeader, keyMD5Header, key string, r *http.Request) {
return
}

// In backwards compatiable, the header's value is not base64 encoded,
// In backwards compatible, the header's value is not base64 encoded,
// and needs to be encoded and updated by the SDK's customizations.
b64Key := base64.StdEncoding.EncodeToString([]byte(key))
r.Header.Set(keyHeader, b64Key)
Expand Down

0 comments on commit 375b496

Please sign in to comment.