@@ -46,10 +46,10 @@ import (
46
46
//
47
47
// Unfortunately there are a number of open bugs related to
48
48
// interactions among the LoadMode bits:
49
- // - https://github.com/golang/go/issues/56633
50
- // - https://github.com/golang/go/issues/56677
51
- // - https://github.com/golang/go/issues/58726
52
- // - https://github.com/golang/go/issues/63517
49
+ // - https://github.com/golang/go/issues/56633
50
+ // - https://github.com/golang/go/issues/56677
51
+ // - https://github.com/golang/go/issues/58726
52
+ // - https://github.com/golang/go/issues/63517
53
53
type LoadMode int
54
54
55
55
const (
@@ -248,14 +248,13 @@ type Config struct {
248
248
249
249
// Load loads and returns the Go packages named by the given patterns.
250
250
//
251
- // Config specifies loading options;
252
- // nil behaves the same as an empty Config.
251
+ // The cfg parameter specifies loading options; nil behaves the same as an empty [Config].
253
252
//
254
253
// The [Config.Mode] field is a set of bits that determine what kinds
255
254
// of information should be computed and returned. Modes that require
256
255
// more information tend to be slower. See [LoadMode] for details
257
256
// and important caveats. Its zero value is equivalent to
258
- // NeedName | NeedFiles | NeedCompiledGoFiles.
257
+ // [ NeedName] | [ NeedFiles] | [ NeedCompiledGoFiles] .
259
258
//
260
259
// Each call to Load returns a new set of [Package] instances.
261
260
// The Packages and their Imports form a directed acyclic graph.
@@ -272,7 +271,7 @@ type Config struct {
272
271
// Errors associated with a particular package are recorded in the
273
272
// corresponding Package's Errors list, and do not cause Load to
274
273
// return an error. Clients may need to handle such errors before
275
- // proceeding with further analysis. The PrintErrors function is
274
+ // proceeding with further analysis. The [ PrintErrors] function is
276
275
// provided for convenient display of all errors.
277
276
func Load (cfg * Config , patterns ... string ) ([]* Package , error ) {
278
277
ld := newLoader (cfg )
0 commit comments