]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: update c document
authorLin Lin <linlin152@foxmail.com>
Thu, 27 Feb 2025 00:43:12 +0000 (00:43 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 27 Feb 2025 15:57:37 +0000 (07:57 -0800)
Fixes: #11875
Change-Id: I0ea2c3e94d7d1647c2aaa3d488ac3c1f5fb6cb18
GitHub-Last-Rev: 7512b33f055aa225d365d6c949a53778834e8dcd
GitHub-Pull-Request: golang/go#71966
Reviewed-on: https://go-review.googlesource.com/c/go/+/652675
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Matloob <matloob@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/internal/help/helpdoc.go

index 7805f8635782cbb4218570661f528718df1f60c9..dba37e891def0229c7b95c74d359485c7cbe7c7e 100644 (file)
 // interfacing between languages. For information on SWIG see
 // https://swig.org/. When running go build, any file with a .swig
 // extension will be passed to SWIG. Any file with a .swigcxx extension
-// will be passed to SWIG with the -c++ option.
+// will be passed to SWIG with the -c++ option. A package can't be just
+// a .swig or .swigcxx file; there must be at least one .go file, even if
+// it has just a package clause.
 //
 // When either cgo or SWIG is used, go build will pass any .c, .m, .s, .S
 // or .sx files to the C compiler, and any .cc, .cpp, .cxx files to the C++
index 4adabfbbd4b491c589928cbc4d015eb5e3ea9c53..e08b8c7a5ad57ad28a2ef622dd5fa03750f0397e 100644 (file)
@@ -19,7 +19,9 @@ The second is the SWIG program, which is a general tool for
 interfacing between languages. For information on SWIG see
 https://swig.org/. When running go build, any file with a .swig
 extension will be passed to SWIG. Any file with a .swigcxx extension
-will be passed to SWIG with the -c++ option.
+will be passed to SWIG with the -c++ option. A package can't be just
+a .swig or .swigcxx file; there must be at least one .go file, even if
+it has just a package clause.
 
 When either cgo or SWIG is used, go build will pass any .c, .m, .s, .S
 or .sx files to the C compiler, and any .cc, .cpp, .cxx files to the C++