Skip to content

Commit a221d01

Browse files
alexandearldez
andauthored
docs: Replace links to godoc.org with pkg.go.dev (#3584)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent e128f0d commit a221d01

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

docs/src/docs/contributing/architecture.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (cl *ContextLoader) Load(ctx context.Context, linters []*linter.Config) (*l
126126
```
127127

128128
First, we find a load mode as union of load modes for all enabled linters.
129-
We use [go/packages](https://godoc.org/golang.org/x/tools/go/packages) for packages loading and use it's enum `packages.Need*` for load modes.
129+
We use [go/packages](https://pkg.go.dev/golang.org/x/tools/go/packages) for packages loading and use it's enum `packages.Need*` for load modes.
130130
Load mode sets which data does a linter needs for execution.
131131

132132
A linter that works only with AST need minimum of information: only filenames and AST. There is no need for
@@ -165,7 +165,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
165165
WithLoadForGoAnalysis().
166166
WithPresets(linter.PresetBugs).
167167
WithAlternativeNames("vet", "vetshadow").
168-
WithURL("https://golang.org/cmd/vet/"),
168+
WithURL("https://pkg.go.dev/cmd/vet"),
169169
linter.NewConfig(golinters.NewBodyclose()).
170170
WithLoadForGoAnalysis().
171171
WithPresets(linter.PresetPerformance, linter.PresetBugs).
@@ -208,10 +208,10 @@ Currently, all linters except `unused` can be merged into this meta linter.
208208
The `unused` isn't merged because it has high memory usage.
209209

210210
Linters execution starts in `runAnalyzers`. It's the most complex part of the `golangci-lint`.
211-
We use custom [go/analysis](https://godoc.org/golang.org/x/tools/go/analysis) runner there. It runs as much as it can in parallel. It lazy-loads as much as it can
211+
We use custom [go/analysis](https://pkg.go.dev/golang.org/x/tools/go/analysis) runner there. It runs as much as it can in parallel. It lazy-loads as much as it can
212212
to reduce memory usage. Also, it sets all heavyweight data to `nil` as becomes unneeded to save memory.
213213

214-
We don't use existing [multichecker](https://godoc.org/golang.org/x/tools/go/analysis/multichecker) because
214+
We don't use existing [multichecker](https://pkg.go.dev/golang.org/x/tools/go/analysis/multichecker) because
215215
it doesn't use caching and doesn't have some important performance optimizations.
216216

217217
All found by linters issues are represented with `result.Issue` struct:

docs/src/docs/contributing/workflow.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ conduct](https://github.com/golangci/golangci-lint/blob/master/CODE_OF_CONDUCT.m
99

1010
## Setup your machine
1111

12-
`golangci-lint` is written in [Go](https://golang.org/).
12+
`golangci-lint` is written in [Go](https://go.dev).
1313

1414
Prerequisites:
1515

1616
- `make`
17-
- [Go](https://golang.org/doc/install)
17+
- [Go](https://go.dev/doc/install)
1818

1919
Fork and clone [golangci-lint](https://github.com/golangci/golangci-lint) repository.
2020

docs/src/docs/usage/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ the `go tool trace` command and visualization tool.
4848

4949
## Cache
5050

51-
GolangCI-Lint stores its cache in the subdirectory `golangci-lint` inside the [default user cache directory](https://golang.org/pkg/os/#UserCacheDir).
51+
GolangCI-Lint stores its cache in the subdirectory `golangci-lint` inside the [default user cache directory](https://pkg.go.dev/os#UserCacheDir).
5252

5353
You can override the default cache directory with the environment variable `GOLANGCI_LINT_CACHE`; the path must be absolute.

docs/src/docs/usage/performance.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Performance
44

55
## Memory Usage
66

7-
A trade-off between memory usage and execution time can be controlled by [`GOGC`](https://golang.org/pkg/runtime/#hdr-Environment_Variables) environment variable.
7+
A trade-off between memory usage and execution time can be controlled by [`GOGC`](https://pkg.go.dev/runtime#hdr-Environment_Variables) environment variable.
88
Less `GOGC` values trigger garbage collection more frequently and golangci-lint consumes less memory and more CPU. Below is the trade-off table for running on this repo:
99

1010
| `GOGC` | Peak Memory, GB | Execution Time, s |

pkg/lint/lintersdb/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
497497
WithSince("v1.0.0").
498498
WithPresets(linter.PresetFormatting).
499499
WithAutoFix().
500-
WithURL("https://golang.org/cmd/gofmt/"),
500+
WithURL("https://pkg.go.dev/cmd/gofmt"),
501501

502502
linter.NewConfig(golinters.NewGofumpt(gofumptCfg)).
503503
WithSince("v1.28.0").
@@ -514,7 +514,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
514514
WithSince("v1.20.0").
515515
WithPresets(linter.PresetFormatting, linter.PresetImport).
516516
WithAutoFix().
517-
WithURL("https://godoc.org/golang.org/x/tools/cmd/goimports"),
517+
WithURL("https://pkg.go.dev/golang.org/x/tools/cmd/goimports"),
518518

519519
linter.NewConfig(golinters.NewGolint(golintCfg)).
520520
WithSince("v1.0.0").
@@ -562,7 +562,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
562562
WithLoadForGoAnalysis().
563563
WithPresets(linter.PresetBugs, linter.PresetMetaLinter).
564564
WithAlternativeNames("vet", "vetshadow").
565-
WithURL("https://golang.org/cmd/vet/"),
565+
WithURL("https://pkg.go.dev/cmd/vet"),
566566

567567
linter.NewConfig(golinters.NewGrouper(grouperCfg)).
568568
WithSince("v1.44.0").

pkg/result/processors/autogenerated_exclude.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func (p *AutogeneratedExclude) shouldPassIssue(i *result.Issue) (bool, error) {
7070
}
7171

7272
// isGenerated reports whether the source file is generated code.
73-
// Using a bit laxer rules than https://golang.org/s/generatedcode to
73+
// Using a bit laxer rules than https://go.dev/s/generatedcode to
7474
// match more generated code. See #48 and #72.
7575
func isGeneratedFileByComment(doc string) bool {
7676
const (

0 commit comments

Comments
 (0)