Skip to content

fix(cli): avoid standard library module names in nsgo init - #2325

Open
J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2270
Open

J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2270

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

A module template for an app named Time now gets example.com/time as .Module instead of time, without changing the app's slug or ID. An explicit -module that conflicts with a Go standard-library import path is rejected before creating the destination or downloading the template. Non-conflicting defaults are unchanged.

Fixes #2270.

Targets

  • Shared code (nsgo tool)

Screenshots

None; CLI behavior only.

Verification

On macOS arm64:

  • go tool nsgo check ./cmd/nsgo
  • go tool nsgo test -run '^TestInit' ./cmd/nsgo -- -count=1 (5 passed)

Full repository tests were not run locally.

Checklist

  • Conventional Commit title.
  • English and Chinese getting-started guides, app-author skill, and a changelog fragment updated.
  • No third-party code, assets, or dependency changes.

🤖 openai-codex/gpt-6.2-sol

Qualify inferred module-template paths that would shadow the standard library. Reject explicit conflicts before writing scaffold files.

Fixes nsgo-dev#2270
@github-actions github-actions Bot added size/M documentation Improvements or additions to documentation cli bug Something isn't working and removed size/M labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cli documentation Improvements or additions to documentation

Projects

None yet

1 participant