_content: fix for screen reader to announce links open in new window.

Change-Id: Ic2498cf765722cb1d914c37a2b544ae1f4bd6e08
Reviewed-on: https://go-review.googlesource.com/c/website/+/512095
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Prudhvi Krishna Chintala <prudhvikrishna@google.com>
Reviewed-by: Jamal Carvalho <jamal@golang.org>
Run-TryBot: Jamal Carvalho <jamal@golang.org>
This commit is contained in:
prudhvikrishna 2023-07-21 11:48:52 -07:00 коммит произвёл Jamal Carvalho
Родитель 80138e489b
Коммит 7efaa41d53
9 изменённых файлов: 164 добавлений и 139 удалений

Просмотреть файл

@ -7,7 +7,7 @@ title: The Go Blog
{{range first 10 (newest (pages "/blog/*.md")) -}}
{{if .date}}
<p class="blogtitle">
<a href="{{.URL}}">{{.title}}</a>, <span class="date">{{.date.Format "2 January 2006"}}</span><br>
<a href="{{.URL}}" aria-describedby="blog-description">{{.title}}</a>, <span class="date">{{.date.Format "2 January 2006"}}</span><br>
<span class="author">{{with .by}}{{by .}}<br>{{end}}</span>
{{with .Tags}}<span class="tags">{{range .}}{{.}} {{end}}</span>{{end}}
</p>
@ -18,5 +18,9 @@ title: The Go Blog
{{end}}
<p class="blogtitle">
<a href="/blog/all">More articles...</a>
<a href="/blog/all" aria-label="More articles" aria-describedby="blog-description">More articles...</a>
</p>
<div class="screen-reader-only" id="blog-description" hidden>
Opens in new window.
</div>

Просмотреть файл

@ -25,44 +25,44 @@ interpreted language.
<h2>Getting Started</h2>
<h3 id="installing"><a href="/doc/install">Installing Go</a></h3>
<h3 id="installing"><a href="/doc/install" aria-describedby="index-description">Installing Go</a></h3>
<p>Instructions for downloading and installing Go.</p>
<h3 id="get-started-tutorial"><a href="/doc/tutorial/getting-started.html">Tutorial: Getting started</a></h3>
<h3 id="get-started-tutorial"><a href="/doc/tutorial/getting-started.html" aria-describedby="index-description">Tutorial: Getting started</a></h3>
<p>A brief Hello, World tutorial to get started. Learn a bit about Go code, tools, packages, and modules.</p>
<h3 id="create-module-tutorial"><a href="/doc/tutorial/create-module.html">Tutorial: Create a module</a></h3>
<h3 id="create-module-tutorial"><a href="/doc/tutorial/create-module.html" aria-describedby="index-description">Tutorial: Create a module</a></h3>
<p>A tutorial of short topics introducing functions, error handling, arrays, maps, unit testing, and compiling.</p>
<h3 id="workspaces-tutorial"><a href="/doc/tutorial/workspaces.html">Tutorial: Getting started with multi-module workspaces</a></h3>
<h3 id="workspaces-tutorial"><a href="/doc/tutorial/workspaces.html" aria-describedby="index-description">Tutorial: Getting started with multi-module workspaces</a></h3>
<p>Introduces the basics of creating and using multi-module workspaces in Go. Multi-module workspaces are useful for making changes across multiple modules.</p>
<h3 id="web-service-gin-tutorial"><a href="/doc/tutorial/web-service-gin.html">Tutorial: Developing a RESTful API with Go and Gin</a></h3>
<h3 id="web-service-gin-tutorial"><a href="/doc/tutorial/web-service-gin.html" aria-describedby="index-description">Tutorial: Developing a RESTful API with Go and Gin</a></h3>
<p>Introduces the basics of writing a RESTful web service API with Go and the Gin Web Framework.</p>
<h3 id="generics-tutorial"><a href="/doc/tutorial/generics.html">Tutorial: Getting started with generics</a></h3>
<h3 id="generics-tutorial"><a href="/doc/tutorial/generics.html" aria-describedby="index-description">Tutorial: Getting started with generics</a></h3>
<p>With generics, you can declare and use functions or types that are written to work with any of a set of types provided by calling code.</p>
<h3 id="fuzz-tutorial"><a href="/doc/tutorial/fuzz.html">Tutorial: Getting started with fuzzing</a></h3>
<h3 id="fuzz-tutorial"><a href="/doc/tutorial/fuzz.html" aria-describedby="index-description">Tutorial: Getting started with fuzzing</a></h3>
<p>Fuzzing can generate inputs to your tests that can catch edge cases and security issues that you may have missed.</p>
<h3 id="writing-web-applications"><a href="/doc/articles/wiki/">Writing Web Applications</a></h3>
<h3 id="writing-web-applications"><a href="/doc/articles/wiki/" aria-describedby="index-description">Writing Web Applications</a></h3>
<p>Building a simple web application.</p>
<h3 id="code"><a href="code.html">How to write Go code</a></h3>
<h3 id="code"><a href="code.html" aria-describedby="index-description">How to write Go code</a></h3>
<p>
This doc explains how to develop a simple set of Go packages inside a module,
and it shows how to use the <a href="/cmd/go/"><code>go</code>&nbsp;command</a>
to build and test packages.
</p>
<h3 id="go_tour"><a href="/tour/">A Tour of Go</a></h3>
<h3 id="go_tour"><a href="/tour/" aria-describedby="index-description">A Tour of Go</a></h3>
<p>
An interactive introduction to Go in four sections.
The first section covers basic syntax and data structures; the second discusses
methods and interfaces; the third is about Generics; and the fourth introduces Go's concurrency primitives.
Each section concludes with a few exercises so you can practice what you've
learned. You can <a href="/tour/">take the tour online</a> or install it locally with:
learned. You can <a href="/tour/" aria-describedby="index-description">take the tour online</a> or install it locally with:
</p>
<pre class="CopyPaste">
@ -85,51 +85,51 @@ This will place the <code>tour</code> binary in your
<h2>Using and understanding Go</h2>
<h3 id="effective_go"><a href="effective_go.html">Effective Go</a></h3>
<h3 id="effective_go"><a href="effective_go.html" aria-describedby="index-description">Effective Go</a></h3>
<p>
A document that gives tips for writing clear, idiomatic Go code.
A must read for any new Go programmer. It augments the tour and
the language specification, both of which should be read first.
</p>
<h3 id="faq"><a href="/doc/faq">Frequently Asked Questions (FAQ)</a></h3>
<h3 id="faq"><a href="/doc/faq" aria-describedby="index-description">Frequently Asked Questions (FAQ)</a></h3>
<p>
Answers to common questions about Go.
</p>
<h3 id="editors"><a href="editors.html">Editor plugins and IDEs</a></h3>
<h3 id="editors"><a href="editors.html" aria-describedby="index-description">Editor plugins and IDEs</a></h3>
<p>
A document that summarizes commonly used editor plugins and IDEs with
Go support.
</p>
<h3 id="diagnostics"><a href="/doc/diagnostics.html">Diagnostics</a></h3>
<h3 id="diagnostics"><a href="/doc/diagnostics.html" aria-describedby="index-description">Diagnostics</a></h3>
<p>
Summarizes tools and methodologies to diagnose problems in Go programs.
</p>
<h3 id="gc-guide"><a href="/doc/gc-guide">A Guide to the Go Garbage Collector</a></h3>
<h3 id="gc-guide"><a href="/doc/gc-guide" aria-describedby="index-description">A Guide to the Go Garbage Collector</a></h3>
<p>
A document that describes how Go manages memory, and how to make the most of it.
</p>
<h3 id="dependencies"><a href="/doc/modules/managing-dependencies">Managing dependencies</a></h3>
<h3 id="dependencies"><a href="/doc/modules/managing-dependencies" aria-describedby="index-description">Managing dependencies</a></h3>
<p>
When your code uses external packages, those packages (distributed as modules) become dependencies.
</p>
<h3 id="fuzzing"><a href="/security/fuzz">Fuzzing</a></h3>
<h3 id="fuzzing"><a href="/security/fuzz" aria-describedby="index-description">Fuzzing</a></h3>
<p>
Main documentation page for Go fuzzing.
</p>
<h3 id="coverage"><a href="/testing/coverage">Coverage for Go applications</a></h3>
<h3 id="coverage"><a href="/testing/coverage" aria-describedby="index-description">Coverage for Go applications</a></h3>
<p>
Main documentation page for coverage testing of Go applications.
</p>
<h3 id="pgo"><a href="/doc/pgo">Profile-guided optimization</a></h3>
<h3 id="pgo"><a href="/doc/pgo" aria-describedby="index-description">Profile-guided optimization</a></h3>
<p>
Main documentation page for profile-guided optimization (PGO) of Go applications.
</p>
@ -141,42 +141,42 @@ Main documentation page for profile-guided optimization (PGO) of Go applications
<h2>References</h2>
<h3 id="pkg"><a href="/pkg/">Package Documentation</a></h3>
<h3 id="pkg"><a href="/pkg/" aria-describedby="index-description">Package Documentation</a></h3>
<p>
The documentation for the Go standard library.
</p>
<h3 id="cmd"><a href="/doc/cmd">Command Documentation</a></h3>
<h3 id="cmd"><a href="/doc/cmd" aria-describedby="index-description">Command Documentation</a></h3>
<p>
The documentation for the Go tools.
</p>
<h3 id="spec"><a href="/ref/spec">Language Specification</a></h3>
<h3 id="spec"><a href="/ref/spec" aria-describedby="index-description">Language Specification</a></h3>
<p>
The official Go Language specification.
</p>
<h3 id="mod"><a href="/ref/mod">Go Modules Reference</a></h3>
<h3 id="mod"><a href="/ref/mod" aria-describedby="index-description">Go Modules Reference</a></h3>
<p>
A detailed reference manual for Go's dependency management system.
</p>
<h3><a href="/doc/modules/gomod-ref">go.mod file reference</a></h3>
<h3><a href="/doc/modules/gomod-ref" aria-describedby="index-description">go.mod file reference</a></h3>
<p>
Reference for the directives included in a go.mod file.
</p>
<h3 id="go_mem"><a href="/ref/mem">The Go Memory Model</a></h3>
<h3 id="go_mem"><a href="/ref/mem" aria-describedby="index-description">The Go Memory Model</a></h3>
<p>
A document that specifies the conditions under which reads of a variable in
one goroutine can be guaranteed to observe values produced by writes to the
same variable in a different goroutine.
</p>
<h3 id="contributing"><a href="/doc/contribute">Contribution Guide</a></h3>
<h3 id="contributing"><a href="/doc/contribute" aria-describedby="index-description">Contribution Guide</a></h3>
<p>Contributing to Go.</p>
<h3 id="release"><a href="/doc/devel/release.html">Release History</a></h3>
<h3 id="release"><a href="/doc/devel/release.html" aria-describedby="index-description">Release History</a></h3>
<p>A summary of the changes between Go releases.</p>
</section>
@ -186,65 +186,65 @@ same variable in a different goroutine.
<h2>Accessing databases</h2>
<h3 id="data-access-tutorial"><a href="/doc/tutorial/database-access">Tutorial: Accessing a relational database</a></h3>
<h3 id="data-access-tutorial"><a href="/doc/tutorial/database-access" aria-describedby="index-description">Tutorial: Accessing a relational database</a></h3>
<p>
Introduces the basics of accessing a relational database using Go and the
<code>database/sql</code> package in the standard library.
</p>
<h3 id="accessing-databases"><a href="/doc/database/index">Accessing relational databases</a></h3>
<h3 id="accessing-databases"><a href="/doc/database/index" aria-describedby="index-description">Accessing relational databases</a></h3>
<p>
An overview of Go's data access features.
</p>
<h3 id="open-handle"><a href="/doc/database/open-handle">Opening a database handle</a></h3>
<h3 id="open-handle"><a href="/doc/database/open-handle" aria-describedby="index-description">Opening a database handle</a></h3>
<p>
You use the Go database handle to execute database operations. Once you open a
handle with database connection properties, the handle represents a connection
pool it manages on your behalf.
</p>
<h3 id="change-data"><a href="/doc/database/change-data">Executing SQL statements that don't return data</a></h3>
<h3 id="change-data"><a href="/doc/database/change-data" aria-describedby="index-description">Executing SQL statements that don't return data</a></h3>
<p>
For SQL operations that might change the database, including SQL
<code>INSERT</code>, <code>UPDATE</code>, and <code>DELETE</code>, you use
<code>Exec</code> methods.
</p>
<h3 id="querying"><a href="/doc/database/querying">Querying for data</a></h3>
<h3 id="querying"><a href="/doc/database/querying" aria-describedby="index-description">Querying for data</a></h3>
<p>
For <code>SELECT</code> statements that return data from a query, using the
<code>Query</code> or <code>QueryRow</code> method.
</p>
<h3 id="prepared-statements"><a href="/doc/database/prepared-statements">Using prepared statements</a></h3>
<h3 id="prepared-statements"><a href="/doc/database/prepared-statements" aria-describedby="index-description">Using prepared statements</a></h3>
<p>
Defining a prepared statement for repeated use can help your code run a bit
faster by avoiding the overhead of re-creating the statement each time your
code performs the database operation.
</p>
<h3 id="execute-transactions"><a href="/doc/database/execute-transactions">Executing transactions</a></h3>
<h3 id="execute-transactions"><a href="/doc/database/execute-transactions" aria-describedby="index-description">Executing transactions</a></h3>
<p>
<code>sql.Tx</code> exports methods representing transaction-specific semantics,
including <code>Commit</code> and <code>Rollback</code>, as well as methods you
use to perform common database operations.
</p>
<h3 id="cancel-operations"><a href="/doc/database/cancel-operations">Canceling in-progress database operations</a></h3>
<h3 id="cancel-operations"><a href="/doc/database/cancel-operations" aria-describedby="index-description">Canceling in-progress database operations</a></h3>
<p>
Using <a href="https://pkg.go.dev/context#Context">context.Context</a>, you can
have your application's function calls and services stop working early and
return an error when their processing is no longer needed.
</p>
<h3 id="manage-connections"><a href="/doc/database/manage-connections">Managing connections</a></h3>
<h3 id="manage-connections"><a href="/doc/database/manage-connections" aria-describedby="index-description">Managing connections</a></h3>
<p>
For some advanced programs, you might need to tune connection pool parameters
or work with connections explicitly.
</p>
<h3 id="sql-injection"><a href="/doc/database/sql-injection">Avoiding SQL injection risk</a></h3>
<h3 id="sql-injection"><a href="/doc/database/sql-injection" aria-describedby="index-description">Avoiding SQL injection risk</a></h3>
<p>
You can avoid an SQL injection risk by providing SQL parameter values as
<code>sql</code> package function arguments
@ -257,33 +257,33 @@ You can avoid an SQL injection risk by providing SQL parameter values as
<h2>Developing modules</h2>
<h3 id="modules-develop-publish"><a href="/doc/modules/developing">Developing and publishing modules</a></h3>
<h3 id="modules-develop-publish"><a href="/doc/modules/developing" aria-describedby="index-description">Developing and publishing modules</a></h3>
<p>
You can collect related packages into modules, then publish the modules for other developers to use. This topic gives an overview of developing and publishing modules.
</p>
<h3 id="modules-release-workflow"><a href="/doc/modules/release-workflow">Module release and versioning workflow</a></h3>
<h3 id="modules-release-workflow"><a href="/doc/modules/release-workflow" aria-describedby="index-description">Module release and versioning workflow</a></h3>
<p>
When you develop modules for use by other developers, you can follow a workflow that helps ensure a reliable, consistent experience for developers using the module. This topic describes the high-level steps in that workflow.
</p>
<h3 id="modules-managing-source"><a href="/doc/modules/managing-source">Managing module source</a></h3>
<h3 id="modules-managing-source"><a href="/doc/modules/managing-source" aria-describedby="index-description">Managing module source</a></h3>
<p>
When you're developing modules to publish for others to use, you can help ensure that your modules are easier for other developers to use by following the repository conventions described in this topic.
</p>
<h3 id="modules-major-version"><a href="/doc/modules/major-version">Developing a major version update</a></h3>
<h3 id="modules-major-version"><a href="/doc/modules/major-version" aria-describedby="index-description">Developing a major version update</a></h3>
<p>
A major version update can be very disruptive to your module's users because it includes breaking changes and represents a new module. Learn more in this topic.
</p>
<h3 id="modules-publishing"><a href="/doc/modules/publishing">Publishing a module</a></h3>
<h3 id="modules-publishing"><a href="/doc/modules/publishing" aria-describedby="index-description">Publishing a module</a></h3>
<p>
When you want to make a module available for other developers, you publish it so that it's visible to Go tools. Once you've published the module, developers importing its packages will be able to resolve a dependency on the module by running commands such as <code>go get</code>.
</p>
<h3 id="modules-version-numbers"><a href="/doc/modules/version-numbers">Module version numbering</a></h3>
<h3 id="modules-version-numbers"><a href="/doc/modules/version-numbers" aria-describedby="index-description">Module version numbering</a></h3>
<p>
A module's developer uses each part of a module's version number to signal the versions stability and backward compatibility. For each new release, a module's release version number specifically reflects the nature of the module's changes since the preceding release.
@ -296,31 +296,31 @@ A module's developer uses each part of a module's version number to signal the v
<h2>Talks</h2>
<h3 id="video_tour_of_go"><a href="https://research.swtch.com/gotour">A Video Tour of Go</a></h3>
<h3 id="video_tour_of_go"><a href="https://research.swtch.com/gotour" aria-describedby="index-description">A Video Tour of Go</a></h3>
<p>
Three things that make Go fast, fun, and productive:
interfaces, reflection, and concurrency. Builds a toy web crawler to
demonstrate these.
</p>
<h3 id="go_code_that_grows"><a href="https://vimeo.com/53221560">Code that grows with grace</a></h3>
<h3 id="go_code_that_grows"><a href="https://vimeo.com/53221560" aria-describedby="index-description">Code that grows with grace</a></h3>
<p>
One of Go's key design goals is code adaptability; that it should be easy to take a simple design and build upon it in a clean and natural way. In this talk Andrew Gerrand describes a simple "chat roulette" server that matches pairs of incoming TCP connections, and then use Go's concurrency mechanisms, interfaces, and standard library to extend it with a web interface and other features. While the function of the program changes dramatically, Go's flexibility preserves the original design as it grows.
</p>
<h3 id="go_concurrency_patterns"><a href="https://www.youtube.com/watch?v=f6kdp27TYZs">Go Concurrency Patterns</a></h3>
<h3 id="go_concurrency_patterns"><a href="https://www.youtube.com/watch?v=f6kdp27TYZs" aria-describedby="index-description">Go Concurrency Patterns</a></h3>
<p>
Concurrency is the key to designing high performance network services. Go's concurrency primitives (goroutines and channels) provide a simple and efficient means of expressing concurrent execution. In this talk we see how tricky concurrency problems can be solved gracefully with simple Go code.
</p>
<h3 id="advanced_go_concurrency_patterns"><a href="https://www.youtube.com/watch?v=QDDwwePbDtw">Advanced Go Concurrency Patterns</a></h3>
<h3 id="advanced_go_concurrency_patterns"><a href="https://www.youtube.com/watch?v=QDDwwePbDtw" aria-describedby="index-description">Advanced Go Concurrency Patterns</a></h3>
<p>
This talk expands on the <i>Go Concurrency Patterns</i> talk to dive deeper into Go's concurrency primitives.
</p>
<h4 id="talks_more">More</h4>
<p>
See the <a href="/talks">Go Talks site</a> and <a href="/wiki/GoTalks">wiki page</a> for more Go talks.
See the <a href="/talks" aria-describedby="index-description">Go Talks site</a> and <a href="/wiki/GoTalks" aria-describedby="index-description">wiki page</a> for more Go talks.
</p>
</section>
@ -334,51 +334,51 @@ Guided tours of Go programs.
</p>
<ul>
<li><a href="/doc/codewalk/functions">First-Class Functions in Go</a></li>
<li><a href="/doc/codewalk/markov">Generating arbitrary text: a Markov chain algorithm</a></li>
<li><a href="/doc/codewalk/sharemem">Share Memory by Communicating</a></li>
<li><a href="/doc/codewalk/functions" aria-describedby="index-description">First-Class Functions in Go</a></li>
<li><a href="/doc/codewalk/markov" aria-describedby="index-description">Generating arbitrary text: a Markov chain algorithm</a></li>
<li><a href="/doc/codewalk/sharemem" aria-describedby="index-description">Share Memory by Communicating</a></li>
</ul>
<h3>Language</h3>
<ul>
<li><a href="/blog/json-rpc-tale-of-interfaces">JSON-RPC: a tale of interfaces</a></li>
<li><a href="/blog/gos-declaration-syntax">Go's Declaration Syntax</a></li>
<li><a href="/blog/defer-panic-and-recover">Defer, Panic, and Recover</a></li>
<li><a href="/blog/go-concurrency-patterns-timing-out-and">Go Concurrency Patterns: Timing out, moving on</a></li>
<li><a href="/blog/go-slices-usage-and-internals">Go Slices: usage and internals</a></li>
<li><a href="/blog/gif-decoder-exercise-in-go-interfaces">A GIF decoder: an exercise in Go interfaces</a></li>
<li><a href="/blog/error-handling-and-go">Error Handling and Go</a></li>
<li><a href="/blog/organizing-go-code">Organizing Go code</a></li>
<li><a href="/blog/json-rpc-tale-of-interfaces" aria-describedby="index-description">JSON-RPC: a tale of interfaces</a></li>
<li><a href="/blog/gos-declaration-syntax" aria-describedby="index-description">Go's Declaration Syntax</a></li>
<li><a href="/blog/defer-panic-and-recover" aria-describedby="index-description">Defer, Panic, and Recover</a></li>
<li><a href="/blog/go-concurrency-patterns-timing-out-and" aria-describedby="index-description">Go Concurrency Patterns: Timing out, moving on</a></li>
<li><a href="/blog/go-slices-usage-and-internals" aria-describedby="index-description">Go Slices: usage and internals</a></li>
<li><a href="/blog/gif-decoder-exercise-in-go-interfaces" aria-describedby="index-description">A GIF decoder: an exercise in Go interfaces</a></li>
<li><a href="/blog/error-handling-and-go" aria-describedby="index-description">Error Handling and Go</a></li>
<li><a href="/blog/organizing-go-code" aria-describedby="index-description">Organizing Go code</a></li>
</ul>
<h3>Packages</h3>
<ul>
<li><a href="/blog/json-and-go">JSON and Go</a> - using the <a href="/pkg/encoding/json/">json</a> package.</li>
<li><a href="/blog/gobs-of-data">Gobs of data</a> - the design and use of the <a href="/pkg/encoding/gob/">gob</a> package.</li>
<li><a href="/blog/laws-of-reflection">The Laws of Reflection</a> - the fundamentals of the <a href="/pkg/reflect/">reflect</a> package.</li>
<li><a href="/blog/go-image-package">The Go image package</a> - the fundamentals of the <a href="/pkg/image/">image</a> package.</li>
<li><a href="/blog/json-and-go" aria-describedby="index-description">JSON and Go</a> - using the <a href="/pkg/encoding/json/" aria-describedby="index-description">json</a> package.</li>
<li><a href="/blog/gobs-of-data" aria-describedby="index-description">Gobs of data</a> - the design and use of the <a href="/pkg/encoding/gob/" aria-describedby="index-description">gob</a> package.</li>
<li><a href="/blog/laws-of-reflection" aria-describedby="index-description">The Laws of Reflection</a> - the fundamentals of the <a href="/pkg/reflect/" aria-describedby="index-description">reflect</a> package.</li>
<li><a href="/blog/go-image-package" aria-describedby="index-description">The Go image package</a> - the fundamentals of the <a href="/pkg/image/" aria-describedby="index-description">image</a> package.</li>
<li><a href="/blog/go-imagedraw-package">The Go image/draw package</a> - the fundamentals of the <a href="/pkg/image/draw/">image/draw</a> package.</li>
</ul>
<h3>Modules</h3>
<ul>
<li><a href="/blog/using-go-modules">Using Go Modules</a> - an introduction to using modules in a simple project.</li>
<li><a href="/blog/migrating-to-go-modules">Migrating to Go Modules</a> - converting an existing project to use modules.</li>
<li><a href="/blog/publishing-go-modules">Publishing Go Modules</a> - how to make new versions of modules available to others.</li>
<li><a href="/blog/v2-go-modules">Go Modules: v2 and Beyond</a> - creating and publishing major versions 2 and higher.</li>
<li><a href="/blog/module-compatibility">Keeping Your Modules Compatible</a> - how to keep your modules compatible with prior minor/patch versions.</li>
<li><a href="/blog/using-go-modules" aria-describedby="index-description">Using Go Modules</a> - an introduction to using modules in a simple project.</li>
<li><a href="/blog/migrating-to-go-modules" aria-describedby="index-description">Migrating to Go Modules</a> - converting an existing project to use modules.</li>
<li><a href="/blog/publishing-go-modules" aria-describedby="index-description">Publishing Go Modules</a> - how to make new versions of modules available to others.</li>
<li><a href="/blog/v2-go-modules" aria-describedby="index-description">Go Modules: v2 and Beyond</a> - creating and publishing major versions 2 and higher.</li>
<li><a href="/blog/module-compatibility" aria-describedby="index-description">Keeping Your Modules Compatible</a> - how to keep your modules compatible with prior minor/patch versions.</li>
</ul>
<h3>Tools</h3>
<ul>
<li><a href="/doc/articles/go_command.html">About the Go command</a> - why we wrote it, what it is, what it's not, and how to use it.</li>
<li><a href="/doc/comment">Go Doc Comments</a> - writing good program documentation</li>
<li><a href="/doc/gdb">Debugging Go Code with GDB</a></li>
<li><a href="/doc/articles/race_detector.html">Data Race Detector</a> - a manual for the data race detector.</li>
<li><a href="/doc/asm">A Quick Guide to Go's Assembler</a> - an introduction to the assembler used by Go.</li>
<li><a href="/blog/c-go-cgo">C? Go? Cgo!</a> - linking against C code with <a href="/cmd/cgo/">cgo</a>.</li>
<li><a href="/blog/profiling-go-programs">Profiling Go Programs</a></li>
<li><a href="/blog/race-detector">Introducing the Go Race Detector</a> - an introduction to the race detector.</li>
<li><a href="/doc/articles/go_command.html" aria-describedby="index-description">About the Go command</a> - why we wrote it, what it is, what it's not, and how to use it.</li>
<li><a href="/doc/comment" aria-describedby="index-description">Go Doc Comments</a> - writing good program documentation</li>
<li><a href="/doc/gdb" aria-describedby="index-description">Debugging Go Code with GDB</a></li>
<li><a href="/doc/articles/race_detector.html" aria-describedby="index-description">Data Race Detector</a> - a manual for the data race detector.</li>
<li><a href="/doc/asm" aria-describedby="index-description">A Quick Guide to Go's Assembler</a> - an introduction to the assembler used by Go.</li>
<li><a href="/blog/c-go-cgo" aria-describedby="index-description">C? Go? Cgo!</a> - linking against C code with <a href="/cmd/cgo/" aria-describedby="index-description">cgo</a>.</li>
<li><a href="/blog/profiling-go-programs" aria-describedby="index-description">Profiling Go Programs</a></li>
<li><a href="/blog/race-detector" aria-describedby="index-description">Introducing the Go Race Detector</a> - an introduction to the race detector.</li>
</ul>
</section>
@ -388,11 +388,11 @@ Guided tours of Go programs.
<h2>Wiki</h2>
<p>
The <a href="/wiki">Go Wiki</a>, maintained by the Go community, includes articles about the Go language, tools, and other resources.
The <a href="/wiki" aria-describedby="index-description">Go Wiki</a>, maintained by the Go community, includes articles about the Go language, tools, and other resources.
</p>
<p id="learn_more">
See the <a href="/wiki/Learn">Learn</a> page at the <a href="/wiki">Wiki</a>
See the <a href="/wiki/Learn" aria-describedby="index-description">Learn</a> page at the <a href="/wiki" aria-describedby="index-description">Wiki</a>
for more Go learning resources.
</p>
@ -402,12 +402,14 @@ for more Go learning resources.
<section id="nonenglish" class="BigCard">
<h2>Non-English Documentation</h2>
See the <a href="/wiki/NonEnglish">NonEnglish</a> page
at the <a href="/wiki">Wiki</a> for localized
See the <a href="/wiki/NonEnglish" aria-describedby="index-description">NonEnglish</a> page
at the <a href="/wiki" aria-describedby="index-description">Wiki</a> for localized
documentation.
</p>
</section>
<div class="screen-reader-only" id="index-description" hidden>
Opens in new window.
</div>
</div>

Просмотреть файл

@ -9,63 +9,63 @@ sidebar: "bug"
<section id="help" class="BigCard">
<h2>Get help</h2>
<h3 id="mailinglist"><a href="https://groups.google.com/group/golang-nuts">Go Nuts Mailing List</a></h3>
<h3 id="mailinglist"><a href="https://groups.google.com/group/golang-nuts" aria-describedby="help-description">Go Nuts Mailing List</a></h3>
<p>
Get help from Go users, and share your work on the official mailing list.
</p>
<p>
Search the <a href="https://groups.google.com/group/golang-nuts">golang-nuts</a>
Search the <a href="https://groups.google.com/group/golang-nuts" aria-describedby="help-description">golang-nuts</a>
archives and consult the <a href="/doc/go_faq.html">FAQ</a> and
<a href="/wiki">wiki</a> before posting.
</p>
<h3 id="forum"><a href="https://forum.golangbridge.org/">Go Forum</a></h3>
<h3 id="forum"><a href="https://forum.golangbridge.org/" aria-describedby="help-description">Go Forum</a></h3>
<p>
The <a href="https://forum.golangbridge.org/">Go Forum</a> is a discussion
The <a href="https://forum.golangbridge.org/" aria-describedby="help-description">Go Forum</a> is a discussion
forum for Go programmers.
</p>
<h3 id="discord"><a href="https://discord.gg/golang">Gophers Discord</a></h3>
<h3 id="discord"><a href="https://discord.gg/golang" aria-describedby="help-description">Gophers Discord</a></h3>
<p>
Get live support and talk with other gophers on the Go Discord.
</p>
<h3 id="slack"><a href="https://blog.gopheracademy.com/gophers-slack-community/">Gopher Slack</a></h3>
<h3 id="slack"><a href="https://blog.gopheracademy.com/gophers-slack-community/" aria-describedby="help-description">Gopher Slack</a></h3>
<p>Get live support from other users in the Go Slack channel.</p>
<h3 id="irc"><a href="ircs:irc.libera.chat/go-nuts">Go IRC Channel</a></h3>
<h3 id="irc"><a href="ircs:irc.libera.chat/go-nuts" aria-describedby="help-description">Go IRC Channel</a></h3>
<p>Get live support at <code>#go-nuts</code> on <code>irc.libera.chat</code>,
the Go IRC channel.</p>
<h3 id="faq"><a href="/doc/faq">Frequently Asked Questions (FAQ)</a></h3>
<h3 id="faq"><a href="/doc/faq" aria-describedby="help-description">Frequently Asked Questions (FAQ)</a></h3>
<p>Answers to common questions about Go.</p>
</section>
<section id="inform" class="BigCard">
<h2>Stay informed</h2>
<h3 id="announce"><a href="https://groups.google.com/group/golang-announce">Go Announcements Mailing List</a></h3>
<h3 id="announce"><a href="https://groups.google.com/group/golang-announce" aria-describedby="help-description">Go Announcements Mailing List</a></h3>
<p>
Subscribe to
<a href="https://groups.google.com/group/golang-announce">golang-announce</a>
<a href="https://groups.google.com/group/golang-announce" aria-describedby="help-description">golang-announce</a>
for important announcements, such as the availability of new Go releases.
</p>
<h3 id="blog"><a href="https://blog.golang.org">Go Blog</a></h3>
<h3 id="blog"><a href="https://blog.golang.org" aria-describedby="help-description">Go Blog</a></h3>
<p>The Go project's official blog.</p>
<h3 id="twitter"><a href="https://twitter.com/golang">@golang at Twitter</a></h3>
<h3 id="twitter"><a href="https://twitter.com/golang" aria-describedby="help-description">@golang at Twitter</a></h3>
<p>The Go project's official Twitter account.</p>
<h3 id="reddit"><a href="https://reddit.com/r/golang">golang sub-Reddit</a></h3>
<h3 id="reddit"><a href="https://reddit.com/r/golang" aria-describedby="help-description">golang sub-Reddit</a></h3>
<p>
The <a href="https://reddit.com/r/golang">golang sub-Reddit</a> is a place
The <a href="https://reddit.com/r/golang" aria-describedby="help-description">golang sub-Reddit</a> is a place
for Go news and discussion.
</p>
<h3 id="gotime"><a href="https://changelog.com/gotime">Go Time Podcast</a></h3>
<h3 id="gotime"><a href="https://changelog.com/gotime" aria-describedby="help-description">Go Time Podcast</a></h3>
<p>
The <a href="https://changelog.com/gotime">Go Time podcast</a> is a panel of Go experts and special guests
The <a href="https://changelog.com/gotime" aria-describedby="help-description">Go Time podcast</a> is a panel of Go experts and special guests
discussing the Go programming language, the community, and everything in between.
</p>
</section>
@ -74,21 +74,25 @@ discussing the Go programming language, the community, and everything in between
<section id="community" class="BigCard">
<h2>Community resources</h2>
<h3 id="go_user_groups"><a href="/wiki/GoUserGroups">Go User Groups</a></h3>
<h3 id="go_user_groups"><a href="/wiki/GoUserGroups" aria-describedby="help-description">Go User Groups</a></h3>
<p>
Each month in places around the world, groups of Go programmers ("gophers")
meet to talk about Go. Find a chapter near you.
</p>
<h3 id="playground"><a href="/play">Go Playground</a></h3>
<h3 id="playground"><a href="/play" aria-describedby="help-description">Go Playground</a></h3>
<p>A place to write, run, and share Go code.</p>
<h3 id="wiki"><a href="/wiki">Go Wiki</a></h3>
<h3 id="wiki"><a href="/wiki" aria-describedby="help-description">Go Wiki</a></h3>
<p>A wiki maintained by the Go community.</p>
<h3 id="conduct"><a href="/conduct">Code of Conduct</a></h3>
<h3 id="conduct"><a href="/conduct" aria-describedby="help-description">Code of Conduct</a></h3>
<p>
Guidelines for participating in Go community spaces
and a reporting process for handling issues.
</p>
</section>
<div class="screen-reader-only" id="help-description" hidden>
Opens in new window.
</div>

Просмотреть файл

@ -55,15 +55,18 @@ summary: Go is an open source programming language that makes it simple to build
<a class="js-downloadWin">Windows 64-bit</a>,
<a class="js-downloadMac">macOS</a>,
<a class="js-downloadLinux">Linux</a>, and
<a href="/dl/">more</a>
<a href="/dl/" aria-describedby="newwindow-description">more</a>
</p>
<p>
The <code>go</code> command by default downloads and authenticates
modules using the Go module mirror and Go checksum database run by
Google. <a href="/dl">Learn more.</a>
Google. <a href="/dl" aria-describedby="newwindow-description">Learn more.</a>
</p>
</div>
</div>
<div class="screen-reader-only" id="newwindow-description" hidden>
Opens in new window.
</div>
<div class="Hero-gopher">
<img class="Hero-gopherLadder" src="/images/gophers/ladder.svg" alt="Go Gopher climbing a ladder.">
</div>
@ -74,7 +77,7 @@ summary: Go is an open source programming language that makes it simple to build
<div class="WhoUses-header">
<h2 class="WhoUses-headerH2">Companies using Go</h2>
<p class="WhoUses-subheader">Organizations in every industry use Go to power their software and services
<a href="/solutions/" class="WhoUsesCaseStudyList-seeAll">
<a href="/solutions/" class="WhoUsesCaseStudyList-seeAll" aria-describedby="newwindow-description">
View all stories
</a>
</p>
@ -232,7 +235,8 @@ func main() {
</ul>
</div>
<div class="WhyGo-reasonLearnMoreLink">
<a href="{{.link}}">Learn More <i class="material-icons WhyGo-forwardArrowIcon">arrow_forward</i></a>
<a href="{{.link}}" aria-describedby="newwindow-description">Learn More
<i class="material-icons WhyGo-forwardArrowIcon" aria-hidden="true">arrow_forward</i></a>
</div>
</div>
</li>
@ -250,9 +254,9 @@ func main() {
alt="Go Gopher is skateboarding.">
</div>
<div class="WhyGo-reasonShowMoreLink">
<a href="/solutions/use-cases">More use cases <i
class="material-icons
WhyGo-forwardArrowIcon">arrow_forward</i></a>
<a href="/solutions/use-cases" aria-describedby="newwindow-description">More use cases
<i class="material-icons
WhyGo-forwardArrowIcon" aria-hidden="true">arrow_forward</i></a>
</div>
</div>
</li>
@ -268,8 +272,8 @@ func main() {
Explore a wealth of learning resources, including guided journeys, courses, books, and more.
</p>
<div class="GettingStartedGo-ctas">
<a class="GettingStartedGo-primaryCta" href="/learn/">Get Started</a>
<a href="/doc/install/">Download Go</a>
<a class="GettingStartedGo-primaryCta" href="/learn/"aria-describedby="newwindow-description">Get Started</a>
<a href="/doc/install/" aria-describedby="newwindow-description">Download Go</a>
</div>
</div>
<div class="GettingStartedGo-resourcesSection">
@ -278,7 +282,7 @@ func main() {
Resources to start on your own
</li>
<li class="GettingStartedGo-resourceItem">
<a href="/learn#guided-learning-journeys" class="GettingStartedGo-resourceItemTitle">
<a href="/learn#guided-learning-journeys" class="GettingStartedGo-resourceItemTitle" aria-describedby="newwindow-description">
Guided learning journeys
</a>
<div class="GettingStartedGo-resourceItemDescription">
@ -286,7 +290,7 @@ func main() {
</div>
</li>
<li class="GettingStartedGo-resourceItem">
<a href="/learn#online-learning" class="GettingStartedGo-resourceItemTitle">
<a href="/learn#online-learning" class="GettingStartedGo-resourceItemTitle" aria-describedby="newwindow-description">
Online learning
</a>
<div class="GettingStartedGo-resourceItemDescription">
@ -294,7 +298,7 @@ func main() {
</div>
</li>
<li class="GettingStartedGo-resourceItem">
<a href="/learn#featured-books" class="GettingStartedGo-resourceItemTitle">
<a href="/learn#featured-books" class="GettingStartedGo-resourceItemTitle" aria-describedby="newwindow-description">
Featured books
</a>
<div class="GettingStartedGo-resourceItemDescription">
@ -302,7 +306,7 @@ func main() {
</div>
</li>
<li class="GettingStartedGo-resourceItem">
<a href="/learn#self-paced-labs" class="GettingStartedGo-resourceItemTitle">
<a href="/learn#self-paced-labs" class="GettingStartedGo-resourceItemTitle" aria-describedby="newwindow-description">
Cloud Self-paced labs
</a>
<div class="GettingStartedGo-resourceItemDescription">
@ -316,7 +320,7 @@ func main() {
</li>
{{- range first 4 (data "/learn/training.yaml")}}
<li class="GettingStartedGo-resourceItem">
<a href="{{.url}}" class="GettingStartedGo-resourceItemTitle">
<a href="{{.url}}" class="GettingStartedGo-resourceItemTitle" aria-describedby="newwindow-description">
{{.title}}
</a>
<div class="GettingStartedGo-resourceItemDescription">

Просмотреть файл

@ -185,11 +185,11 @@
<div class="Footer-links">
{{- range $menus.footer}}
<div class="Footer-linkColumn">
<a href="{{.url}}" class="Footer-link Footer-link--primary">
<a href="{{.url}}" class="Footer-link Footer-link--primary" aria-describedby="footer-description">
{{.name}}
</a>
{{- range .children}}
<a href="{{.url}}" class="Footer-link">
<a href="{{.url}}" class="Footer-link" aria-describedby="footer-description">
{{.name}}
</a>
{{- end}}
@ -198,19 +198,22 @@
</div>
</div>
</div>
<div class="screen-reader-only" id="footer-description" hidden>
Opens in new window.
</div>
<div class="Footer">
<div class="Container Container--fullBleed">
<div class="Footer-bottom">
<img class="Footer-gopher" src="/images/gophers/pilot-bust.svg" alt="The Go Gopher">
<ul class="Footer-listRow">
<li class="Footer-listItem">
<a href="/copyright">Copyright</a>
<a href="/copyright" aria-describedby="footer-description">Copyright</a>
</li>
<li class="Footer-listItem">
<a href="/tos">Terms of Service</a>
<a href="/tos" aria-describedby="footer-description">Terms of Service</a>
</li>
<li class="Footer-listItem">
<a href="http://www.google.com/intl/en/policies/privacy/"
<a href="http://www.google.com/intl/en/policies/privacy/" aria-describedby="footer-description"
target="_blank"
rel="noopener">
Privacy Policy
@ -218,7 +221,7 @@
</li>
<li class="Footer-listItem">
<a
href="/s/website-issue"
href="/s/website-issue" aria-describedby="footer-description"
target="_blank"
rel="noopener"
>
@ -476,7 +479,7 @@
<aside class="Sidebar">
<h4>Report Issues</h4>
<p>If you spot bugs, mistakes, or inconsistencies in the Go project's code or documentation, please let us know by filing a ticket on our <a href="https://github.com/golang/go/issues">issue tracker.</a> Of course, you should check it's not an existing issue before creating a new one.</p>
<a class="btn" href="https://github.com/golang/go/issues">Filing a ticket</a>
<a class="btn" href="https://github.com/golang/go/issues" aria-describedby="footer-description">Filing a ticket</a>
</aside>
{{end}}
@ -484,19 +487,19 @@
<aside class="Sidebar Sidebar-faq">
<h4>Release Notes</h4>
<p>Learn about what's new in each Go release.</p>
<a class="link" href="/doc/devel/release">View release notes</a>
<a class="link" href="/doc/devel/release" aria-describedby="footer-description">View release notes</a>
<h4>Code of Conduct</h4>
<p>Guidelines for participating in Go community spaces and reporting process for handing issues.</p>
<a class="link" href="/conduct">View more</a>
<a class="link" href="/conduct" aria-describedby="footer-description">View more</a>
<h4>Brand Guidelines</h4>
<p>Guidance about reusing the Go logo, gopher mascot, etc.</p>
<a class="link" href="/blog/go-brand">View guidelines</a>
<a class="link" href="/blog/go-brand" aria-describedby="footer-description">View guidelines</a>
<h4>Contribute Guide</h4>
<p>Learn how to file bugs, pull requests, or otherwise contribute to the Go ecosystem.</p>
<a class="link" href="/doc/contribute">View guide</a>
<a class="link" href="/doc/contribute" aria-describedby="footer-description">View guide</a>
<h4>Get connected</h4>
<div class="Sidebar-socialLinks">

Просмотреть файл

@ -29,9 +29,9 @@ layout: none
</h2>
<p class="Solutions-headlineBody">
{{with .quote}}{{.}}{{end}}
<a href="{{.URL}}"
<a href="{{.URL}}" aria-describedby="casestudy-description"
>Learn more
<i class="material-icons Solutions-forwardArrowIcon"
<i class="material-icons Solutions-forwardArrowIcon" aria-hidden="true"
>arrow_forward</i
>
</a>
@ -43,6 +43,9 @@ layout: none
{{- end}}
</ul>
</div>
<div class="screen-reader-only" id="casestudy-description" hidden>
Opens in new window.
</div>
<button
class="js-solutionsHeroCarouselPrev GoCarousel-controlPrev GoCarousel-controlPrev-solutionsHero"
hidden
@ -99,7 +102,7 @@ layout: none
{{- end}}
</p>
</div>
<div class="MarketingCard-section__bottom">
<div class="MarketingCard-section__bottom" aria-describedby="casestudy-description">
<p class="MarketingCard-action">View Case Study</p>
</div>
</a>

Просмотреть файл

@ -43,7 +43,7 @@ layout: none
{{.description}}
</p>
</div>
<div class="MarketingCard-section__bottom">
<div class="MarketingCard-section__bottom" aria-describedby="usecase-description">
<p class="MarketingCard-action">
Learn More
</p>
@ -54,4 +54,7 @@ layout: none
{{- end}}
</ul>
</div>
<div class="screen-reader-only" id="usecase-description" hidden>
Opens in new window.
</div>
</section>

Просмотреть файл

@ -11,7 +11,7 @@
<h4>Articles:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a>: {{.Title}}</dd>
<dd><a href="/{{.Path}}" aria-describedby="talks-description">{{.Name}}</a>: {{.Title}}</dd>
{{end}}
</dl>
{{end}}
@ -20,7 +20,7 @@
<h4>Slide decks:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a>: {{.Title}}</dd>
<dd><a href="/{{.Path}}" aria-describedby="talks-description">{{.Name}}</a>: {{.Title}}</dd>
{{end}}
</dl>
{{end}}
@ -29,7 +29,7 @@
<h4>Files:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a></dd>
<dd><a href="/{{.Path}}" aria-describedby="talks-description">{{.Name}}</a></dd>
{{end}}
</dl>
{{end}}
@ -38,7 +38,7 @@
<h4>Sub-directories:</h4>
<dl>
{{range .}}
<dd><a href="/{{.Path}}">{{.Name}}</a></dd>
<dd><a href="/{{.Path}}" aria-describedby="talks-description">{{.Name}}</a></dd>
{{end}}
</dl>
{{end}}
@ -46,5 +46,7 @@
</article>
<div class="screen-reader-only" id="talks-description" hidden>
Opens in new window.
</div>
{{end}}

2
cmd/golangorg/testdata/talks.txt поставляемый
Просмотреть файл

@ -5,7 +5,7 @@ GET https://talks.golang.org/any/thing
redirect == https://go.dev/talks/any/thing
GET https://go.dev/talks/
body contains <a href="/talks/2009">2009</a>
body !contains <a href="/talks/2009">2009</a>
GET https://go.dev/talks/2011/lex.slide#39
body contains <i>(Note: This restriction was lifted in Go version 1 but the discussion is still interesting.)</i>