internal/goexperiment: fix godoc formatting

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>
This commit is contained in:
Olivier Mengué
2024-07-01 00:49:11 +02:00
committed by Gopher Robot
parent 740857f529
commit fdd7713fe5
2 changed files with 12 additions and 12 deletions

View File

@@ -25,7 +25,7 @@ type ExperimentFlags struct {
// (This is not necessarily the set of experiments the compiler itself // (This is not necessarily the set of experiments the compiler itself
// was built with.) // 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" // default in the current toolchain. This is, in effect, the "control"
// configuration and any variation from this is an experiment. // configuration and any variation from this is an experiment.
var Experiment ExperimentFlags = func() ExperimentFlags { var Experiment ExperimentFlags = func() ExperimentFlags {
@@ -54,7 +54,7 @@ var FramePointerEnabled = GOARCH == "amd64" || GOARCH == "arm64"
// configuration tuple and returns the enabled and baseline experiment // configuration tuple and returns the enabled and baseline experiment
// flag sets. // flag sets.
// //
// TODO(mdempsky): Move to internal/goexperiment. // TODO(mdempsky): Move to [internal/goexperiment].
func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) { func ParseGOEXPERIMENT(goos, goarch, goexp string) (*ExperimentFlags, error) {
// regabiSupported is set to true on platforms where register ABI is // regabiSupported is set to true on platforms where register ABI is
// supported and enabled by default. // supported and enabled by default.

View File

@@ -14,32 +14,32 @@
// //
// Experiments are exposed to the build in the following ways: // Experiments are exposed to the build in the following ways:
// //
// - Build tag goexperiment.x is set if experiment x (lower case) is // - Build tag goexperiment.x is set if experiment x (lower case) is
// enabled. // enabled.
// //
// - For each experiment x (in camel case), this package contains a // - For each experiment x (in camel case), this package contains a
// boolean constant x and an integer constant xInt. // boolean constant x and an integer constant xInt.
// //
// - In runtime assembly, the macro GOEXPERIMENT_x is defined if // - In runtime assembly, the macro GOEXPERIMENT_x is defined if
// experiment x (lower case) is enabled. // experiment x (lower case) is enabled.
// //
// In the toolchain, the set of experiments enabled for the current // In the toolchain, the set of experiments enabled for the current
// build should be accessed via objabi.Experiment. // 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. // and "go version <binary>" if it differs from the default experiments.
// //
// For the set of experiments supported by the current toolchain, see // For the set of experiments supported by the current toolchain, see
// "go doc goexperiment.Flags". // "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 // and records the experiments that were enabled when the package
// was compiled (as boolean and integer constants). // was compiled (as boolean and integer constants).
// //
// Note especially that this package does not itself change behavior // Note especially that this package does not itself change behavior
// at run time based on the GOEXPERIMENT variable. // at run time based on the GOEXPERIMENT variable.
// The code used in builds to interpret 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 package goexperiment
//go:generate go run mkconsts.go //go:generate go run mkconsts.go
@@ -51,7 +51,7 @@ package goexperiment
// tags, experiments use the strings.ToLower of their field name. // tags, experiments use the strings.ToLower of their field name.
// //
// For the baseline experimental configuration, see // For the baseline experimental configuration, see
// [internal/buildcfg.ParseGOEXPERIMENT]. // [internal/buildcfg.Experiment].
// //
// If you change this struct definition, run "go generate". // If you change this struct definition, run "go generate".
type Flags struct { type Flags struct {