all: fix and test for references to github.com/golang/go/issues and wiki
Insist on the canonical /issue/ and /wiki/ links instead. Change-Id: I7a2eedda69bc3fcd11466722a41f00c9dbaf283f Reviewed-on: https://go-review.googlesource.com/c/website/+/550323 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This commit is contained in:
Родитель
5f31ab0a4d
Коммит
b52edba3f8
|
@ -42,7 +42,7 @@ We are excited about all of our new gophers and actively working to improve our
|
|||
It’s hard to believe that it’s only been five years since
|
||||
the first Go conferences and Go meetups.
|
||||
We’ve seen major growth in this area of community leadership over the last year.
|
||||
There are now over 20 [Go conferences](https://github.com/golang/go/wiki/Conferences)
|
||||
There are now over 20 [Go conferences](/wiki/Conferences)
|
||||
and over 300 [Go-related meetups](https://www.meetup.com/topics/golang/) spanning the globe.
|
||||
|
||||
Thanks to the hard work put into these many conferences and meetups,
|
||||
|
|
|
@ -154,7 +154,7 @@ and improved handling of issues and code changes in the future.
|
|||
|
||||
The tools breakout session during the contributor summit took an extended form,
|
||||
with two further sessions on the main conference days organized by the
|
||||
[golang-tools](https://github.com/golang/go/wiki/golang-tools) group.
|
||||
[golang-tools](/wiki/golang-tools) group.
|
||||
This summary is broken down into two parts: the tools session at the contributor workshop,
|
||||
and a combined report from the golang-tools sessions on the main conference days.
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ clear the fuzz cache by running `gotip clean -fuzzcache`.
|
|||
This feature will become available starting in Go 1.18.
|
||||
|
||||
If you experience any problems or have an idea for a feature, please [file an
|
||||
issue](https://github.com/golang/go/issues/new/?&labels=fuzz).
|
||||
issue](/issue/new/?&labels=fuzz).
|
||||
|
||||
For discussion and general feedback about the feature, you can also participate
|
||||
in the [#fuzzing channel](https://gophers.slack.com/archives/CH5KV1AKE) in
|
||||
|
|
|
@ -241,7 +241,7 @@ documentation](https://pkg.go.dev/golang.org/x/tools/gopls#readme-editors).
|
|||
- Try using [workspaces](/ref/mod#workspaces) with the [Go
|
||||
workspaces Tutorial](/doc/tutorial/workspaces).
|
||||
- If you encounter any problems with workspaces, or want to suggest
|
||||
something, file an [issue](https://github.com/golang/go/issues/new/choose).
|
||||
something, file an [issue](/issue/new).
|
||||
- Read the
|
||||
[workspace maintenance documentation](https://pkg.go.dev/cmd/go#hdr-Workspace_maintenance).
|
||||
- Explore module commands for [working outside of a single
|
||||
|
|
|
@ -23,7 +23,7 @@ We estimate there are now [over one million](https://research.swtch.com/gopherco
|
|||
Go developers worldwide.
|
||||
Go powers many of the most critical cloud infrastructure projects,
|
||||
including Kubernetes, Istio, and Docker.
|
||||
Companies like Lyft, Capital One, Netflix and [many more](https://github.com/golang/go/wiki/GoUsers)
|
||||
Companies like Lyft, Capital One, Netflix and [many more](/wiki/GoUsers)
|
||||
are depending on Go in production.
|
||||
Over the years, we've found that developers love Go for cloud development
|
||||
because of its efficiency,
|
||||
|
|
|
@ -18,7 +18,7 @@ be that the `go` tool now does
|
|||
Of course, one of the hundreds of smaller changes may be **your** favorite.
|
||||
|
||||
To celebrate the release, Go User Groups around the world are holding
|
||||
[release parties](https://github.com/golang/go/wiki/Go-1.10-Release-Party).
|
||||
[release parties](/wiki/Go-1.10-Release-Party).
|
||||
See if there's one in your area, or feel free to organize one!
|
||||
|
||||
Thanks to everyone who contributed to this release and everyone who
|
||||
|
|
|
@ -81,7 +81,7 @@ And, of course, there are many more additions, improvements, and fixes.
|
|||
You can find them all in the comprehensive [release notes](/doc/go1.6).
|
||||
|
||||
To celebrate the release,
|
||||
[Go User Groups around the world](https://github.com/golang/go/wiki/Go-1.6-release-party)
|
||||
[Go User Groups around the world](/wiki/Go-1.6-release-party)
|
||||
are holding release parties on the 17th of February.
|
||||
Online, the Go contributors are hosting a question and answer session
|
||||
on the [golang subreddit](https://reddit.com/r/golang) for the next 24 hours.
|
||||
|
|
|
@ -45,7 +45,7 @@ Go 1.8 includes many more additions, improvements, and fixes.
|
|||
Find the complete set of changes, and more information about the improvements listed above, in the
|
||||
[Go 1.8 release notes](/doc/go1.8.html).
|
||||
|
||||
To celebrate the release, Go User Groups around the world are holding [release parties](https://github.com/golang/go/wiki/Go-1.8-release-party) this week.
|
||||
To celebrate the release, Go User Groups around the world are holding [release parties](/wiki/Go-1.8-release-party) this week.
|
||||
Release parties have become a tradition in the Go community, so if you missed out this time, keep an eye out when 1.9 nears.
|
||||
|
||||
Thank you to over 200 contributors who helped with this release.
|
||||
|
|
|
@ -29,7 +29,7 @@ Note that you can set `GO111MODULE` and other variables permanently with `go env
|
|||
We plan to drop support for GOPATH mode in Go 1.17.
|
||||
In other words, Go 1.17 will ignore `GO111MODULE`.
|
||||
If you have projects that do not build in module-aware mode, now is the time to migrate.
|
||||
If there is a problem preventing you from migrating, please consider filing an [issue](https://github.com/golang/go/issues/new) or an [experience report](https://github.com/golang/go/wiki/ExperienceReports).
|
||||
If there is a problem preventing you from migrating, please consider filing an [issue](/issue/new) or an [experience report](/wiki/ExperienceReports).
|
||||
|
||||
## No automatic changes to go.mod and go.sum
|
||||
|
||||
|
@ -135,5 +135,5 @@ See [Controlling version control tools with `GOVCS`](/ref/mod#vcs-govcs) for mor
|
|||
|
||||
## What's next?
|
||||
|
||||
We hope you find these features useful. We're already hard at work on the next set of module features for Go 1.17, particularly [lazy module loading](https://github.com/golang/go/issues/36460), which should make the module loading process faster and more stable.
|
||||
We hope you find these features useful. We're already hard at work on the next set of module features for Go 1.17, particularly [lazy module loading](/issue/36460), which should make the module loading process faster and more stable.
|
||||
As always, if you run into new bugs, please let us know on the [issue tracker](https://github.com/golang/go/issues). Happy coding!
|
||||
|
|
|
@ -95,7 +95,7 @@ community have a chance to experiment with the new features and collect
|
|||
further feedback.
|
||||
|
||||
5. _Launch decision_. At the end of the three month
|
||||
[development cycle](https://github.com/golang/go/wiki/Go-Release-Cycle)
|
||||
[development cycle](/wiki/Go-Release-Cycle)
|
||||
(just when starting the three month repo freeze before a release), and
|
||||
based on the experience and feedback gathered during the release cycle,
|
||||
the Go team makes the final decision about whether to ship each change.
|
||||
|
@ -152,14 +152,14 @@ breaking existing code, and thus they serve as a perfect trial balloon.
|
|||
With all that said, we propose the following selection of Go 2 proposals for
|
||||
the Go 1.13 release (step 1 in the proposal evaluation process):
|
||||
|
||||
1. [_\#20706_](https://github.com/golang/go/issues/20706) _General Unicode identifiers based on_ [_Unicode TR31_](http://unicode.org/reports/tr31/):
|
||||
1. [_\#20706_](/issue/20706) _General Unicode identifiers based on_ [_Unicode TR31_](http://unicode.org/reports/tr31/):
|
||||
This addresses an important issue for Go programmers using non-Western alphabets
|
||||
and should have little if any impact on anyone else. There are normalization
|
||||
questions which we need to answer and where community feedback will be
|
||||
important, but after that the implementation path is well understood.
|
||||
Note that identifier export rules will not be affected by this.
|
||||
|
||||
2. [_\#19308_](https://github.com/golang/go/issues/19308), [_\#28493_](https://github.com/golang/go/issues/28493) _Binary integer literals and support for \_ in number literals_:
|
||||
2. [_\#19308_](/issue/19308), [_\#28493_](/issue/28493) _Binary integer literals and support for \_ in number literals_:
|
||||
These are relatively minor changes that seem hugely popular among many
|
||||
programmers. They may not quite reach the threshold of solving an
|
||||
“important issue” (hexadecimal numbers have worked well so far) but they
|
||||
|
@ -168,7 +168,7 @@ a pain point for some programmers. They have minimal impact on others who
|
|||
don’t care about binary integer literals or number formatting, and the
|
||||
implementation is well understood.
|
||||
|
||||
3. [_\#19113_](https://github.com/golang/go/issues/19113) _Permit signed integers as shift counts_:
|
||||
3. [_\#19113_](/issue/19113) _Permit signed integers as shift counts_:
|
||||
An estimated 38% of all non-constant shifts require an (artificial) uint
|
||||
conversion (see the issue for a more detailed break-down). This proposal
|
||||
will clean up a lot of code, get shift expressions better in sync with index
|
||||
|
|
|
@ -238,4 +238,4 @@ $ go install golang.org/x/tools/gopls@latest
|
|||
|
||||
Please try it out and fill out the [survey](https://google.qualtrics.com/jfe/form/SV_4SnGxpcSKN33WZw?s=blog) ---
|
||||
and if you should encounter a bug,
|
||||
[report it](https://github.com/golang/go/issues/new/choose) and we will fix it.
|
||||
[report it](/issue/new) and we will fix it.
|
||||
|
|
|
@ -205,7 +205,7 @@ If `go vet` is reporting this kind of problem in your own tests,
|
|||
fixing them will prepare you better for Go 1.22.
|
||||
|
||||
If you run into other problems,
|
||||
[the FAQ](https://github.com/golang/go/wiki/LoopvarExperiment#my-test-fails-with-the-change-how-can-i-debug-it)
|
||||
[the FAQ](/wiki/LoopvarExperiment#my-test-fails-with-the-change-how-can-i-debug-it)
|
||||
has links to examples and details about using a tool we’ve written to identify
|
||||
which specific loop is causing a test failure when the new semantics are applied.
|
||||
|
||||
|
|
|
@ -141,5 +141,5 @@ newest modules that people are using.
|
|||
## Feedback or bugs
|
||||
|
||||
We hope these services improve your experience with modules, and encourage you
|
||||
to [file issues](https://github.com/golang/go/issues/new?title=proxy.golang.org) if you run into
|
||||
to [file issues](/issue/new?title=proxy.golang.org) if you run into
|
||||
problems or have feedback!
|
||||
|
|
|
@ -35,7 +35,7 @@ We had anticipated 35 conferences this year
|
|||
and thousands of meetups, nearly all of which have
|
||||
now changed, been postponed, or been canceled.
|
||||
We’ll keep the
|
||||
[conferences wiki page](https://github.com/golang/go/wiki/Conferences)
|
||||
[conferences wiki page](/wiki/Conferences)
|
||||
updated as plans change.
|
||||
|
||||
We want to do everything we can to help support impacted Go conferences.
|
||||
|
|
|
@ -83,5 +83,5 @@ or some other combination.
|
|||
|
||||
The next target we’d like to add support for is ARM64 Windows 10 systems.
|
||||
If you have expertise and would like to help,
|
||||
we’re coordinating work on [golang.org/issue/36439](https://github.com/golang/go/issues/36439).
|
||||
we’re coordinating work on [golang.org/issue/36439](/issue/36439).
|
||||
|
||||
|
|
|
@ -273,7 +273,7 @@ process. Your contributions improved `slog` immensely.
|
|||
The [documentation](https://pkg.go.dev/log/slog) for the `log/slog` package
|
||||
explains how to use it and provides several examples.
|
||||
|
||||
The [wiki page](https://github.com/golang/go/wiki/Resources-for-slog) has
|
||||
The [wiki page](/wiki/Resources-for-slog) has
|
||||
additional resources provided by the Go community, including a variety of
|
||||
handlers.
|
||||
|
||||
|
|
|
@ -1052,6 +1052,6 @@ or unimportant in production code, and that our current implementation covers a
|
|||
majority of all useful code scenarios.
|
||||
|
||||
That said, if you run into a situation where you believe type inference should work or
|
||||
went astray, please [file an issue](https://github.com/golang/go/issues/new/choose)!
|
||||
went astray, please [file an issue](/issue/new)!
|
||||
As always, the Go team loves to hear from you, especially when it helps us making Go
|
||||
even better.
|
||||
|
|
|
@ -175,7 +175,7 @@ easy:
|
|||
|
||||
<!-- Note: we can't use $(go env GOBIN) here until https://golang.org/issue/23439 is addressed. -->
|
||||
<pre>
|
||||
# Windows users should consult https://github.com/golang/go/wiki/SettingGOPATH
|
||||
# Windows users should consult /wiki/SettingGOPATH
|
||||
# for setting %PATH%.
|
||||
$ <b>export PATH=$PATH:$(dirname $(go list -f '{{"{{.Target}}"}}' .))</b>
|
||||
$ <b>hello</b>
|
||||
|
|
|
@ -32,7 +32,7 @@ Go supports all of the most common relational database management systems,
|
|||
including MySQL, Oracle, Postgres, SQL Server, SQLite, and more.
|
||||
|
||||
You'll find a complete list of drivers at the
|
||||
[SQLDrivers](https://github.com/golang/go/wiki/SQLDrivers) page.
|
||||
[SQLDrivers](/wiki/SQLDrivers) page.
|
||||
|
||||
### Functions to execute queries or make database changes {#functions}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ more, see [Freeing resources](#free_resources).
|
|||
### Locating and importing a database driver {#database_driver}
|
||||
|
||||
You'll need a database driver that supports the DBMS you're using. To locate
|
||||
a driver for your database, see [SQLDrivers](https://github.com/golang/go/wiki/SQLDrivers).
|
||||
a driver for your database, see [SQLDrivers](/wiki/SQLDrivers).
|
||||
|
||||
To make the driver available to your code, you import it as you would
|
||||
another Go package. Here's an example:
|
||||
|
|
|
@ -29,6 +29,6 @@ or as a plugin for IntelliJ IDEA Ultimate</li>
|
|||
<p>
|
||||
Note that these are only a few top solutions; a more comprehensive
|
||||
community-maintained list of
|
||||
<a href="https://github.com/golang/go/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
|
||||
<a href="/wiki/IDEsAndTextEditorPlugins">IDEs and text editor plugins</a>
|
||||
is available at the Wiki.
|
||||
</p>
|
||||
|
|
|
@ -49,7 +49,7 @@ and growing set of documents, blogs, and books do a fine job of
|
|||
describing modern Go usage.
|
||||
Effective Go continues to be useful, but the reader should
|
||||
understand it is far from a complete guide.
|
||||
See <a href="https://github.com/golang/go/issues/28782">issue
|
||||
See <a href="/issue/28782">issue
|
||||
28782</a> for context.
|
||||
</p>
|
||||
|
||||
|
|
|
@ -257,13 +257,13 @@ but there are many more.
|
|||
<p>
|
||||
It's not just cloud, though.
|
||||
The Go Wiki includes a
|
||||
<a href="https://github.com/golang/go/wiki/GoUsers">page</a>,
|
||||
<a href="/wiki/GoUsers">page</a>,
|
||||
updated regularly, that lists some of the many companies using Go.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Wiki also has a page with links to
|
||||
<a href="https://github.com/golang/go/wiki/SuccessStories">success stories</a>
|
||||
<a href="/wiki/SuccessStories">success stories</a>
|
||||
about companies and projects that are using the language.
|
||||
</p>
|
||||
|
||||
|
|
|
@ -1050,19 +1050,19 @@ For more information, see the following additional resources.
|
|||
document for determining when to start a concurrent mark phase.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/golang/go/issues/30333">Smarter scavenging</a>—Design
|
||||
<a href="/issue/30333">Smarter scavenging</a>—Design
|
||||
document for revising the way the Go runtime returns memory to the operating system.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/golang/go/issues/35112">Scalable page allocator</a>—Design
|
||||
<a href="/issue/35112">Scalable page allocator</a>—Design
|
||||
document for revising the way the Go runtime manages memory it gets from the operating system.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/golang/go/issues/44167">GC pacer redesign (Go 1.18)</a>—Design
|
||||
<a href="/issue/44167">GC pacer redesign (Go 1.18)</a>—Design
|
||||
document for revising the algorithm to determine when to start a concurrent mark phase.
|
||||
</li>
|
||||
<li>
|
||||
<a href="https://github.com/golang/go/issues/48409">Soft memory limit (Go 1.19)</a>—Design
|
||||
<a href="/issue/48409">Soft memory limit (Go 1.19)</a>—Design
|
||||
document for the soft memory limit.
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -263,7 +263,7 @@ Go 1.15 adds a `-spectre` flag to both the
|
|||
compiler and the assembler, to allow enabling Spectre mitigations.
|
||||
These should almost never be needed and are provided mainly as a
|
||||
“defense in depth” mechanism.
|
||||
See the [Spectre wiki page](https://github.com/golang/go/wiki/Spectre) for details.
|
||||
See the [Spectre wiki page](/wiki/Spectre) for details.
|
||||
|
||||
<!-- CL 228578 -->
|
||||
The compiler now rejects `//go:` compiler directives that
|
||||
|
|
|
@ -503,7 +503,7 @@ than before. In some cases, pre-Go 1.18 error messages provided more
|
|||
detail or were phrased in a more helpful way.
|
||||
We intend to address these cases in Go 1.19.
|
||||
|
||||
<!-- https://github.com/golang/go/issues/49569 -->
|
||||
<!-- /issue/49569 -->
|
||||
Because of changes in the compiler related to supporting generics, the
|
||||
Go 1.18 compile speed can be roughly 15% slower than the Go 1.17 compile speed.
|
||||
The execution time of the compiled code is not affected. We
|
||||
|
|
|
@ -26,7 +26,7 @@ We expect almost all Go programs to continue to compile and run as before.
|
|||
|
||||
<!-- https://go.dev/issue/52038 -->
|
||||
There is only one small change to the language,
|
||||
a [very small correction](https://github.com/golang/go/issues/52038)
|
||||
a [very small correction](/issue/52038)
|
||||
to the [scope of type parameters in method declarations](/ref/spec#Declarations_and_scope).
|
||||
Existing programs are unaffected.
|
||||
|
||||
|
|
|
@ -263,4 +263,4 @@ Profiles from alternative source may be used with Go PGO if converted to the [pp
|
|||
|
||||
_Note: Before Go 1.21, DWARF metadata omits function start lines (`DW_AT_decl_line`), which may make it difficult for tools to determine the start line._
|
||||
|
||||
See the [PGO Tools](https://github.com/golang/go/wiki/PGO-Tools) page on the Go Wiki for additional information about PGO compatibility of specific third-party tools.
|
||||
See the [PGO Tools](/wiki/PGO-Tools) page on the Go Wiki for additional information about PGO compatibility of specific third-party tools.
|
||||
|
|
|
@ -86,7 +86,7 @@ issues that would already be caught by an existing test.
|
|||
Note that it is up to you to decide how long to run fuzzing. It is very possible
|
||||
that an execution of fuzzing could run indefinitely if it doesn't find any errors.
|
||||
There will be support to run these fuzz tests continuously using tools like OSS-Fuzz
|
||||
in the future, see [Issue #50192](https://github.com/golang/go/issues/50192).
|
||||
in the future, see [Issue #50192](/issue/50192).
|
||||
|
||||
**Note:** Fuzzing should be run on a platform that supports coverage
|
||||
instrumentation (currently AMD64 and ARM64) so that the corpus can meaningfully
|
||||
|
@ -334,7 +334,7 @@ by an attacker.
|
|||
## Feedback
|
||||
|
||||
If you experience any problems or have an idea for a feature, please [file an
|
||||
issue](https://github.com/golang/go/issues/new?&labels=fuzz).
|
||||
issue](/issue/new?&labels=fuzz).
|
||||
|
||||
For discussion and general feedback about the feature, you can also participate
|
||||
in the [#fuzzing channel](https://gophers.slack.com/archives/CH5KV1AKE) in
|
||||
|
|
|
@ -196,7 +196,7 @@ Locate and import a database driver that will translate requests you make
|
|||
through functions in the `database/sql` package into requests the database
|
||||
understands.
|
||||
|
||||
1. In your browser, visit the [SQLDrivers](https://github.com/golang/go/wiki/SQLDrivers)
|
||||
1. In your browser, visit the [SQLDrivers](/wiki/SQLDrivers)
|
||||
wiki page to identify a driver you can use.
|
||||
|
||||
Use the list on the page to identify the driver you'll use. For accessing
|
||||
|
|
|
@ -730,10 +730,10 @@ Nicely done! You've just introduced yourself to fuzzing in Go.
|
|||
|
||||
The next step is to choose a function in your code that you'd like to fuzz, and
|
||||
try it out! If fuzzing finds a bug in your code, consider adding it to the
|
||||
[trophy case](https://github.com/golang/go/wiki/Fuzzing-trophy-case).
|
||||
[trophy case](/wiki/Fuzzing-trophy-case).
|
||||
|
||||
If you experience any problems or have an idea for a feature, [file an
|
||||
issue](https://github.com/golang/go/issues/new/?&labels=fuzz).
|
||||
issue](/issue/new/?&labels=fuzz).
|
||||
|
||||
For discussion and general feedback about the feature, you can also participate
|
||||
in the [#fuzzing channel](https://gophers.slack.com/archives/CH5KV1AKE) in
|
||||
|
|
|
@ -89,7 +89,7 @@
|
|||
document.querySelectorAll('.js-searchForm input')
|
||||
).pop();
|
||||
// Favoring the Firefox quick find feature over search input
|
||||
// focus. See: https://github.com/golang/go/issues/41093.
|
||||
// focus. See: go.dev/issue/41093.
|
||||
if (searchInput && !window.navigator.userAgent.includes('Firefox')) {
|
||||
e.preventDefault();
|
||||
searchInput.focus();
|
||||
|
|
|
@ -42,7 +42,7 @@ main:
|
|||
external: true
|
||||
- name: Conferences
|
||||
explanation: Learn and network with Go developers from around the world
|
||||
url: https://github.com/golang/go/wiki/Conferences
|
||||
url: /wiki/Conferences
|
||||
external: true
|
||||
- name: Go blog
|
||||
explanation: The Go project's official blog.
|
||||
|
|
|
@ -503,7 +503,7 @@ Women Who Go - 7 chapters already!
|
|||
|
||||
Go 1.6 ships soon!
|
||||
|
||||
Go meetups are organising to hold a [[https://github.com/golang/go/wiki/Go-1.6-release-party][release party]] on the 17th of February.
|
||||
Go meetups are organising to hold a [[/wiki/Go-1.6-release-party][release party]] on the 17th of February.
|
||||
|
||||
.image state-of-go/img/party-gopher.png _ 300
|
||||
.caption Join the party!!!
|
||||
|
|
|
@ -516,7 +516,7 @@ Since Go 1.8:
|
|||
|
||||
Go 1.8 ships soon!
|
||||
|
||||
Go meetups are organising to hold a [[https://github.com/golang/go/wiki/Go-1.8-release-party][release party]] on the 16th of February.
|
||||
Go meetups are organising to hold a [[/wiki/Go-1.8-release-party][release party]] on the 16th of February.
|
||||
|
||||
.image state-of-go/img/party-gopher.png _ 300
|
||||
.caption Join the party!!!
|
||||
|
|
|
@ -288,6 +288,17 @@ func fixURL(u *url.URL) string {
|
|||
u.Scheme = ""
|
||||
u.Path = "/" + name + u.Path
|
||||
return u.String()
|
||||
case "github.com":
|
||||
if strings.HasPrefix(u.Path, "/golang/go/issues/") {
|
||||
u.Host = "go.dev"
|
||||
u.Path = "/issue/" + strings.TrimPrefix(u.Path, "/golang/go/issues/")
|
||||
return u.String()
|
||||
}
|
||||
if strings.HasPrefix(u.Path, "/golang/go/wiki/") {
|
||||
u.Host = "go.dev"
|
||||
u.Path = "/wiki/" + strings.TrimPrefix(u.Path, "/golang/go/wiki/")
|
||||
return u.String()
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче