Skip to content

Commit bb700bf

Browse files
authored
docs: Formatting and punctuation changes (#4235)
1 parent 452f266 commit bb700bf

3 files changed

Lines changed: 17 additions & 17 deletions

File tree

CONTRIBUTING.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ again.
1818
## Reporting issues
1919

2020
Bugs, feature requests, and development-related questions should be directed to
21-
our [GitHub issue tracker](https://github.com/google/go-github/issues). If
21+
our [GitHub issue tracker](https://github.com/google/go-github/issues). If
2222
reporting a bug, please try and provide as much context as possible such as
2323
your operating system, Go version, and anything else that might be relevant to
24-
the bug. For feature requests, please explain what you're trying to do, and
24+
the bug. For feature requests, please explain what you're trying to do, and
2525
how the requested feature would help you do that.
2626

2727
Security related bugs can either be reported in the issue tracker, or if they
@@ -163,20 +163,20 @@ Every exported method and type needs to have code comments that follow
163163
//
164164
//meta:operation GET /repos/{owner}/{repo}
165165
func (s *RepositoriesService) Get(ctx context.Context, owner, repo string) (*Repository, *Response, error) {
166-
u := fmt.Sprintf("repos/%v/%v", owner, repo)
167-
req, err := s.client.NewRequest(ctx, "GET", u, nil)
168-
...
166+
u := fmt.Sprintf("repos/%v/%v", owner, repo)
167+
req, err := s.client.NewRequest(ctx, "GET", u, nil)
168+
// ...
169169
}
170170
```
171171
And the returned type `Repository` will have comments like this:
172172

173173
```go
174174
// Repository represents a GitHub repository.
175175
type Repository struct {
176-
ID *int64 `json:"id,omitempty"`
177-
NodeID *string `json:"node_id,omitempty"`
178-
Owner *User `json:"owner,omitempty"`
179-
...
176+
ID *int64 `json:"id,omitempty"`
177+
NodeID *string `json:"node_id,omitempty"`
178+
Owner *User `json:"owner,omitempty"`
179+
// ...
180180
}
181181
```
182182

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ is recommended, ex:
314314
```go
315315
import (
316316
"github.com/bartventer/httpcache"
317-
_ "github.com/bartventer/httpcache/store/memcache" // Register the in-memory backend
317+
_ "github.com/bartventer/httpcache/store/memcache" // Register the in-memory backend
318318
)
319319

320320
client, err := github.NewClient(github.WithHTTPClient(httpcache.NewClient("memcache://")), github.WithAuthToken(os.Getenv("GITHUB_TOKEN")))

scrape/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
[![Go Reference](https://pkg.go.dev/badge/github.com/google/go-github/scrape.svg)](https://pkg.go.dev/github.com/google/go-github/scrape)
22

33
The scrape package provides an experimental client for accessing additional
4-
GitHub data via screen scraping. It is designed to be a client of last resort
4+
GitHub data via screen scraping. It is designed to be a client of last resort
55
for data that cannot be retrieved via the REST or GraphQL APIs.
66

77
# What should be added here
88

9-
**Add only what you need.** Whereas the main go-github library attempts to
9+
**Add only what you need.** Whereas the main go-github library attempts to
1010
implement the entire GitHub REST API, there is little point in trying to do that
11-
here. Certainly, feel free to contribute patches to get data you actually
11+
here. Certainly, feel free to contribute patches to get data you actually
1212
need, but I'd rather not try and provide exhaustive coverage of all GitHub data
1313
here.
1414

15-
**Add only what can't be accessed elsewhere.** If the data can be retrieved
15+
**Add only what can't be accessed elsewhere.** If the data can be retrieved
1616
through the REST or GraphQL API, use the appropriate libraries for that.
1717

18-
**Prefer read-only access.** For now, I'm only focusing on reading data. It
18+
**Prefer read-only access.** For now, I'm only focusing on reading data. It
1919
might be that writing works fine as well, but it is of course much riskier.
2020

2121
# How to add methods
2222

23-
See [apps.go](apps.go) for examples of methods that access data. Basically,
23+
See [apps.go](apps.go) for examples of methods that access data. Basically,
2424
fetch the contents of the page using `client.get`, and then use goquery to dig
25-
into the markup on the page. Prefer selectors that grab semantic ID or class
25+
into the markup on the page. Prefer selectors that grab semantic ID or class
2626
names, as they are more likely to be stable.

0 commit comments

Comments
 (0)