Skip to content

Commit 959f959

Browse files
committed
style(docs): refine wording in Go instructions
Signed-off-by: umatare5 <umatare5@gmail.com> AI-assisted-by: GitHub Copilot Coding Agent
1 parent 63888fc commit 959f959

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/instructions/go.instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Follow idiomatic Go practices and community standards when writing Go code. Thes
9191
- Use line comments (`//`) for most comments
9292
- Use block comments (`/* */`) sparingly, mainly for package documentation
9393
- Document why, not what, unless the what is complex
94-
- Avoid emoji in comments and code
94+
- Avoid using emoji in comments and code
9595

9696
### Error Handling
9797

@@ -224,7 +224,7 @@ Follow idiomatic Go practices and community standards when writing Go code. Thes
224224

225225
### HTTP Clients
226226

227-
- Keep the client struct focused on configuration and dependencies only (e.g., base URL, `*http.Client`, auth, default headers). It must not store per-request state
227+
- Keep the client struct focused on configuration and dependencies only (e.g., base URL, `*http.Client`, auth, default headers). It must not store any per-request state
228228
- Do not store or cache `*http.Request` inside the client struct, and do not persist request-specific state across calls; instead, construct a fresh request per method invocation
229229
- Methods should accept `context.Context` and input parameters, assemble the `*http.Request` locally (or via a short-lived builder/helper created per call), then call `c.httpClient.Do(req)`
230230
- If request-building logic is reused, factor it into unexported helper functions or a per-call builder type; never keep `http.Request` (URL params, body, headers) as fields on the long-lived client
@@ -368,6 +368,6 @@ Follow idiomatic Go practices and community standards when writing Go code. Thes
368368
- Not understanding nil interfaces vs nil pointers
369369
- Forgetting to close resources (files, connections)
370370
- Using global variables unnecessarily
371-
- Over-using unconstrained types (e.g., `any`); prefer specific types or generic type parameters with constraints. If an unconstrained type is required, use `any` rather than `interface{}`
371+
- Overusing unconstrained types (e.g., `any`); prefer specific types or generic type parameters with constraints. If an unconstrained type is required, use `any` rather than `interface{}`
372372
- Not considering the zero value of types
373-
- **Creating duplicate `package` declarations** - this is a compile error; always check existing files before adding package declarations
373+
- **Creating duplicate `package` declarations** - this is a compile error; always check existing files before adding package declarations

0 commit comments

Comments
 (0)