Fix lint error regarding struct with unexported fields (#38)

Unexported fields are skipped during marshalling, so this would be a
nop.

The code in `./cmd/sync/github*.go` is currently unused.

Confirmed that staticcheck passes when run with:

```
staticcheck -checks SA9005 ./...
```
This commit is contained in:
Pieter Noordhuis 2022-09-07 15:15:07 +02:00 committed by GitHub
parent c00db56d84
commit 80a4c47d62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ func githubGetPAT(ctx context.Context) (string, error) {
return "", fmt.Errorf("failed to acquire access token: %w", err) return "", fmt.Errorf("failed to acquire access token: %w", err)
} }
raw, err = json.Marshal(struct { raw, err = json.Marshal(struct {
note string Note string `json:"note"`
scopes []string Scopes []string `json:"scopes"`
}{"test token", []string{}}) }{"test token", []string{}})
if err != nil { if err != nil {
return "", err return "", err