]> Cypherpunks repositories - gostls13.git/commitdiff
internal/goexperiment: fix godoc formatting
authorOlivier Mengué <olivier.mengue@gmail.com>
Sun, 30 Jun 2024 22:49:11 +0000 (00:49 +0200)
committerGopher Robot <gobot@golang.org>
Mon, 30 Jun 2025 19:14:39 +0000 (12:14 -0700)
In internal/goexperiment fix godoc formatting (list indent, add godoc
links).

In internal/buildcfg fix godoc for Experiment.baseline.

Change-Id: I30eaba60cbf3978a375b50dda19dbb2830903bdb
Reviewed-on: https://go-review.googlesource.com/c/go/+/595915
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Austin Clements <austin@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>

src/internal/buildcfg/exp.go
src/internal/goexperiment/flags.go

index e36ec08a5b0232656bd3f45b61ba2079d0da813f..689ca8ce58a6f2029fc93a2976c93df5bf5104cb 100644 (file)
@@ -25,7 +25,7 @@ type ExperimentFlags struct {
 // (This is not necessarily the set of experiments the compiler itself
 // was built with.)
 //
-// experimentBaseline specifies the experiment flags that are enabled by
+// Experiment.baseline specifies the experiment flags that are enabled by
 // default in the current toolchain. This is, in effect, the "control"
 // configuration and any variation from this is an experiment.
 var Experiment ExperimentFlags = func() ExperimentFlags {
@@ -54,7 +54,7 @@ var FramePointerEnabled = GOARCH == "amd64" || GOARCH == "arm64"
 // configuration tuple and returns the enabled and baseline experiment
 // flag sets.
 //
-// TODO(mdempsky): Move to internal/goexperiment.
+// TODO(mdempsky): Move to [internal/goexperiment].
 func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
        // regabiSupported is set to true on platforms where register ABI is
        // supported and enabled by default.
index ceff24193d89a59bfac804faf80871bc83a4d8d6..63a338883991e0638a417a71badeb9469571722e 100644 (file)
 //
 // Experiments are exposed to the build in the following ways:
 //
-// - Build tag goexperiment.x is set if experiment x (lower case) is
-// enabled.
+//   - Build tag goexperiment.x is set if experiment x (lower case) is
+//     enabled.
 //
-// - For each experiment x (in camel case), this package contains a
-// boolean constant x and an integer constant xInt.
+//   - For each experiment x (in camel case), this package contains a
+//     boolean constant x and an integer constant xInt.
 //
-// - In runtime assembly, the macro GOEXPERIMENT_x is defined if
-// experiment x (lower case) is enabled.
+//   - In runtime assembly, the macro GOEXPERIMENT_x is defined if
+//     experiment x (lower case) is enabled.
 //
 // In the toolchain, the set of experiments enabled for the current
 // build should be accessed via objabi.Experiment.
 //
-// The set of experiments is included in the output of runtime.Version()
+// The set of experiments is included in the output of [runtime.Version]()
 // and "go version <binary>" if it differs from the default experiments.
 //
 // For the set of experiments supported by the current toolchain, see
 // "go doc goexperiment.Flags".
 //
-// Note that this package defines the set of experiments (in Flags)
+// Note that this package defines the set of experiments (in [Flags])
 // and records the experiments that were enabled when the package
 // was compiled (as boolean and integer constants).
 //
 // Note especially that this package does not itself change behavior
 // at run time based on the GOEXPERIMENT variable.
 // The code used in builds to interpret the GOEXPERIMENT variable
-// is in the separate package internal/buildcfg.
+// is in the separate package [internal/buildcfg].
 package goexperiment
 
 //go:generate go run mkconsts.go
@@ -51,7 +51,7 @@ package goexperiment
 // tags, experiments use the strings.ToLower of their field name.
 //
 // For the baseline experimental configuration, see
-// [internal/buildcfg.ParseGOEXPERIMENT].
+// [internal/buildcfg.Experiment].
 //
 // If you change this struct definition, run "go generate".
 type Flags struct {