Skip to content

Improve Go SDK Context7 docs#7

Merged
kriptoburak merged 1 commit into
mainfrom
codex/go-context7-docs
May 7, 2026
Merged

Improve Go SDK Context7 docs#7
kriptoburak merged 1 commit into
mainfrom
codex/go-context7-docs

Conversation

@kriptoburak
Copy link
Copy Markdown
Member

@kriptoburak kriptoburak commented May 7, 2026

Summary

  • Add a compact Context7 guide for Go SDK install, auth, first request, workflows, and public sources.
  • Link Context7 from the README landing links.
  • Prepare context7.json for repo-managed parsing by excluding operational files and pointing agents to the focused guide.

Context7

  • Current public benchmark is stale on SHA 884f895 and still uses dashboard config.
  • Refresh returned too-early: Context7 requires 10 days between updates.
  • This PR prepares the repo for the next allowed refresh or switching Context7 management to context7.json.

Validation

  • git diff --check
  • jq empty context7.json
  • go test ./...
  • Link checks returned HTTP 200 for Context7, DeepWiki, pkg.go.dev, Xquik Go SDK docs, REST API docs, and OpenAPI.

Note

Add Context7 documentation and configuration for the Go SDK

  • Adds docs/CONTEXT7.md with a compact guide covering install, authentication, a first-request example, and common workflows.
  • Updates context7.json to exclude .github, CHANGELOG.md, CODE_OF_CONDUCT.md, CONTRIBUTING.md, LICENSE, and SECURITY.md from processing, and points guidance to both README.md and docs/CONTEXT7.md.
  • Adds a Context7 link to README.md.

Macroscope summarized 194cf4d.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR adds a compact Context7-facing guide (docs/CONTEXT7.md), links it from the README landing bar, and tightens context7.json with exclude lists and updated rules. The changes are documentation-only with no impact on the Go SDK itself.

  • docs/CONTEXT7.md — new guide covering install, auth, first request, workflow table, and public source links; import block is missing os, context, and fmt, which causes copy-paste compile failures.
  • context7.json — adds excludeFolders/excludeFiles to narrow what Context7 ingests and points agents at the new guide.
  • README.md — inserts a Context7 link into the existing landing links row.

Confidence Score: 4/5

Safe to merge after fixing the missing standard-library imports in the code example.

The new CONTEXT7.md guide omits os, context, and fmt from its import block while all three are used in the code snippets that follow. Any agent or developer copying those blocks verbatim will get a compile error. The README link addition and context7.json updates are correct and low-risk.

docs/CONTEXT7.md — the import block needs the missing standard-library packages before the guide is fully usable.

Important Files Changed

Filename Overview
docs/CONTEXT7.md New compact guide for Context7; import block is missing os, context, and fmt — code snippets won't compile verbatim. Version pin is also hard-coded to v0.4.1.
context7.json Adds excludeFolders/excludeFiles and updates rules to reference docs/CONTEXT7.md; changes look correct and consistent.
README.md Adds Context7 link to the landing links row; minimal, correct change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Context7 Agent] -->|reads context7.json rules| B[context7.json]
    B -->|rule: use README.md and docs/CONTEXT7.md first| C[README.md]
    B -->|rule: use README.md and docs/CONTEXT7.md first| D[docs/CONTEXT7.md]
    B -->|rule: use api.md for method coverage| E[api.md]
    D --> F[Install go get]
    D --> G[Authenticate option.WithAPIKey]
    D --> H[First Request client.X.Tweets.Search]
    D --> I[Workflow Table]
    D --> J[Public Sources]
    B -->|excludeFiles| K[CHANGELOG / LICENSE / SECURITY]
    B -->|excludeFolders| L[.github]
Loading

Reviews (1): Last reviewed commit: "Improve Go SDK Context7 docs" | Re-trigger Greptile

Comment thread docs/CONTEXT7.md
Comment on lines +16 to +19
import (
xtwitterscraper "github.com/Xquik-dev/x-twitter-scraper-go"
"github.com/Xquik-dev/x-twitter-scraper-go/option"
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The import block omits the standard-library packages (os, context, fmt) that the subsequent code snippets rely on. An AI agent or developer copying these blocks verbatim will get compile errors because os.Getenv, context.TODO(), and fmt.Printf are not imported.

Suggested change
import (
xtwitterscraper "github.com/Xquik-dev/x-twitter-scraper-go"
"github.com/Xquik-dev/x-twitter-scraper-go/option"
)
import (
"context"
"fmt"
"os"
xtwitterscraper "github.com/Xquik-dev/x-twitter-scraper-go"
"github.com/Xquik-dev/x-twitter-scraper-go/option"
)

Comment thread docs/CONTEXT7.md
## Install

```sh
go get github.com/Xquik-dev/x-twitter-scraper-go@v0.4.1
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Hard-pinning v0.4.1 means this install command will silently stay on an old version as the SDK evolves. Using @latest keeps it current without manual doc updates.

Suggested change
go get github.com/Xquik-dev/x-twitter-scraper-go@v0.4.1
go get github.com/Xquik-dev/x-twitter-scraper-go@latest

@kriptoburak kriptoburak merged commit 1a2c6c6 into main May 7, 2026
12 checks passed
@kriptoburak kriptoburak deleted the codex/go-context7-docs branch May 7, 2026 23:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant