From 72b8b1e9e393fa987f5ddfa205ace1ea01f2d592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 26 Oct 2022 13:47:07 +0200 Subject: Fix typos --- README.md | 8 ++++---- capabilities/package.go | 2 +- generated.go | 6 +++--- headers.go | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2e19428..d7f9f83 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ account, err := gopherschwift.Wrap(client, nil) From this point, follow the [API documentation](https://godoc.org/github.com/majewsky/schwift) for what you can do with the `schwift.Account` object. For example, to download an object's contents into a string: -``` +```go text, err := account.Container("foo").Object("bar.txt").Download(nil).AsString() ``` @@ -60,7 +60,7 @@ text, err := account.Container("foo").Object("bar.txt").Download(nil).AsString() The most popular Swift client library is [`ncw/swift`](https://github.com/ncw/swift). I have [used it](https://github.com/docker/distribution/pull/2441) [extensively](https://github.com/sapcc/swift-http-import) and my main gripe with it is that its API is mostly based on single functions. When your API is a function, you cannot easily -add further arguments to it without breaking backwards compatiblity. Whenever someone wants to do something slightly +add further arguments to it without breaking backwards compatibility. Whenever someone wants to do something slightly different, an entirely new function needs to be added. To witness, ncw/swift has five functions for listing objects, four functions for downloading objects, and three functions for uploading objects. (And that's without considering the separate API for large objects.) And still, when you try to do something that's not one of the 10 most common things, @@ -70,9 +70,9 @@ missing something](https://github.com/ncw/swift/issues?utf8=%E2%9C%93&q=is%3Aiss Schwift improves on ncw/swift by: -- allowing the user to set arbitary headers and URL parameters in every request method, +- allowing the user to set arbitrary headers and URL parameters in every request method, - including a pointer to `RequestOpts` in every request method, which can later be extended with new members without - breaking backwards compatiblity, and + breaking backwards compatibility, and - providing a generic `Request.Do()` method as a last resort for users who need to do a request that absolutely cannot be made with the existing request methods. diff --git a/capabilities/package.go b/capabilities/package.go index 3d1e5a3..9ea2921 100644 --- a/capabilities/package.go +++ b/capabilities/package.go @@ -21,7 +21,7 @@ // trigger otherwise. // // THIS IS A PRIVATE MODULE. It is not covered by any forwards or backwards -// compatiblity and may be gone at a moment's notice. +// compatibility and may be gone at a moment's notice. package capabilities // AllowBulkDelete can be set to false to force Schwift to act as if the server diff --git a/generated.go b/generated.go index e7ffcd9..66c672a 100644 --- a/generated.go +++ b/generated.go @@ -11,7 +11,7 @@ package schwift // AccountHeaders contains the headers for a schwift.Account instance. // // To read and write well-known headers, use the methods on this type. -// To read and write arbitary headers, use the methods on the Headers supertype. +// To read and write arbitrary headers, use the methods on the Headers supertype. type AccountHeaders struct { Headers } @@ -98,7 +98,7 @@ func (h AccountHeaders) CreatedAt() FieldUnixTimeReadonly { // ContainerHeaders contains the headers for a schwift.Container instance. // // To read and write well-known headers, use the methods on this type. -// To read and write arbitary headers, use the methods on the Headers supertype. +// To read and write arbitrary headers, use the methods on the Headers supertype. type ContainerHeaders struct { Headers } @@ -241,7 +241,7 @@ func (h ContainerHeaders) VersionsLocation() FieldString { // ObjectHeaders contains the headers for a schwift.Object instance. // // To read and write well-known headers, use the methods on this type. -// To read and write arbitary headers, use the methods on the Headers supertype. +// To read and write arbitrary headers, use the methods on the Headers supertype. type ObjectHeaders struct { Headers } diff --git a/headers.go b/headers.go index ec953d2..a4fda78 100644 --- a/headers.go +++ b/headers.go @@ -28,7 +28,7 @@ import ( // Users will typically use one of the subtypes (AccountHeaders, // ContainerHeaders, ObjectHeaders) instead, which provide type-safe access to // well-known headers. The http.Header-like interface on this type can be used -// read and write arbitary headers. For example, the following calls are +// read and write arbitrary headers. For example, the following calls are // equivalent: // // h := make(AccountHeaders) -- cgit v1.2.3