跳转到主要内容

章节Go 语言文档

Content

127 页更新于 4 小时前

开始阅读

本章内容127

  1. 01 go_command The Go distribution includes a command, named " go", that automates the downloading, building, installation... 4 小时前
  2. 02 Coverage profiling support for integration tests Table of Contents: Overview Building a binary for coverage profiling Running a coverage-instrumented binary... 4 天前
  3. 03 index See the Documents page and the Blog index for a complete list of Go articles. 4 小时前
  4. 04 Go Doc Comments Table of Contents: Packages Commands Types Funcs Consts Vars Syntax Common mistakes and pitfalls “Doc comme... 4 天前
  5. 05 Introduction Data races are among the most common and hardest to debug types of bugs in concurrent systems. A data race ... 4 小时前
  6. 06 conduct 4 天前
  7. 07 Editing {{.Title}} 4 小时前
  8. 08 contrib 4 天前
  9. 09 Introduction Covered in this tutorial: Creating a data structure with load and save methods Using the net/http package ... 4 小时前
  10. 10 copyright redirect: /copyright 4 天前
  11. 11 {{.Title}} [edit] {{printf "%s" .Body}} 4 小时前
  12. 12 debugging_with_gdb 4 天前
  13. 13 docs 4 天前
  14. 14 cmd There is a suite of programs to build and process Go source code. Instead of being run directly, programs i... 4 小时前
  15. 15 Frequently Asked Questions (FAQ) What is the purpose of the project? {#What_is_the_purpose_of_the_project} At the time of Go's inception in ... 4 天前
  16. 16 Introduction This document demonstrates the development of a simple Go package inside a module and introduces the go too... 4 小时前
  17. 17 fuzz redirect: /security/fuzz 4 天前
  18. 18 gccgo_install 4 天前
  19. 19 go-get-install-deprecation Overview Starting in Go 1.17, installing executables with go get is deprecated. go install may be used ins... 4 天前
  20. 20 Go 1.1 Release Notes THE RELEASE of Go version 1 (Go 1 or Go 1.0 for short) in March of 2012 introduced a new period of stabilit... 4 天前
  21. 21 contribute The Go project welcomes all contributors. This document is a guide to help you through the process of contr... 4 小时前
  22. 22 Go 1.10 Release Notes Introduction to Go 1.10 {#introduction} The latest Go release, version 1.10, arrives six months after Go 1.... 4 天前
  23. 23 Go 1.11 Release Notes Introduction to Go 1.11 {#introduction} The latest Go release, version 1.11, arrives six months after Go 1.... 4 天前
  24. 24 Go 1.12 Release Notes Introduction to Go 1.12 {#introduction} The latest Go release, version 1.12, arrives six months after Go 1.... 4 天前
  25. 25 Go 1.13 Release Notes Introduction to Go 1.13 {#introduction} The latest Go release, version 1.13, arrives six months after Go 1.... 4 天前
  26. 26 Go 1.14 Release Notes Introduction to Go 1.14 {#introduction} The latest Go release, version 1.14, arrives six months after Go 1.... 4 天前
  27. 27 Go 1.15 Release Notes Introduction to Go 1.15 {#introduction} The latest Go release, version 1.15, arrives six months after Go 1.... 4 天前
  28. 28 Go 1.16 Release Notes Introduction to Go 1.16 {#introduction} The latest Go release, version 1.16, arrives six months after Go 1.... 4 天前
  29. 29 Go 1.17 Release Notes Introduction to Go 1.17 {#introduction} The latest Go release, version 1.17, arrives six months after Go 1.... 4 天前
  30. 30 Go 1.18 Release Notes Introduction to Go 1.18 {#introduction} The latest Go release, version 1.18, is a significant release, incl... 4 天前
  31. 31 Go 1.19 Release Notes Introduction to Go 1.19 {#introduction} The latest Go release, version 1.19, arrives five months after Go 1... 4 天前
  32. 32 Go 1.2 Release Notes Since the release of Go version 1.1 in April, 2013, the release schedule has been shortened to make the rel... 4 天前
  33. 33 Go 1.20 Release Notes Introduction to Go 1.20 {#introduction} The latest Go release, version 1.20, arrives six months after Go 1.... 4 天前
  34. 34 pre_go1 This page summarizes the changes between stable releases of Go prior to Go 1. See the Release History page ... 4 小时前
  35. 35 Go 1.21 Release Notes Introduction to Go 1.21 {#introduction} The latest Go release, version 1.21, arrives six months after Go 1.... 4 天前
  36. 36 release This page summarizes the changes between official stable releases of Go. The change log has the full detail... 4 小时前
  37. 37 Go 1.22 Release Notes Introduction to Go 1.22 {#introduction} The latest Go release, version 1.22, arrives six months after Go 1.... 4 天前
  38. 38 weekly This page summarizes the changes between tagged weekly snapshots of Go. Such snapshots are no longer create... 4 小时前
  39. 39 Go 1.23 Release Notes Introduction to Go 1.23 {#introduction} The latest Go release, version 1.23, arrives six months after Go 1.... 4 天前
  40. 40 Introduction The Go ecosystem provides a large suite of APIs and tools to diagnose logic and performance problems in Go ... 4 小时前
  41. 41 Go 1.24 Release Notes Introduction to Go 1.24 {#introduction} The latest Go release, version 1.24, arrives in February 2025, six ... 4 天前
  42. 42 Go 1.25 Release Notes Introduction to Go 1.25 {#introduction} The latest Go release, version 1.25, arrives in August 2025, six mo... 4 天前
  43. 43 Introduction This document lists commonly used editor plugins and IDEs from the Go ecosystem that make Go development mo... 4 小时前
  44. 44 Go 1.26 Release Notes Introduction to Go 1.26 {#introduction} The latest Go release, version 1.26, arrives in February 2026, six ... 4 天前
  45. 45 effective_go Note: This document was written for Go's release in 2009 and is not actively updated. While it remains a go... 4 小时前
  46. 46 Go 1.27 Release Notes Introduction to Go 1.27 {#introduction} The latest Go release, version 1.27, arrives in August 2026, six mo... 4 天前
  47. 47 Go 1.28 Release Notes {{/* This is a placeholder template that makes it possible to preview Go 1.28 release notes draft at https:... 4 天前
  48. 48 Go 1.3 Release Notes The latest Go release, version 1.3, arrives six months after 1.2, and contains no language changes. It focu... 4 天前
  49. 49 Introduction This guide is intended to aid advanced Go users in better understanding their application costs by providin... 4 小时前
  50. 50 Go 1.4 Release Notes The latest Go release, version 1.4, arrives as scheduled six months after 1.3. It contains only one tiny la... 4 天前
  51. 51 Go 1.5 Release Notes The latest Go release, version 1.5, is a significant release, including major architectural changes to the ... 4 天前
  52. 52 Introduction These are some notes on contributing to the gccgo frontend for GCC. For information on contributing to part... 4 小时前
  53. 53 Go 1.6 Release Notes Introduction to Go 1.6 {#introduction} The latest Go release, version 1.6, arrives six months after 1.5. Mo... 4 天前
  54. 54 gdb The following instructions apply to the standard toolchain (the gc Go compiler and tools). Gccgo has nativ... 4 小时前
  55. 55 Go 1.7 Release Notes Introduction to Go 1.7 {#introduction} The latest Go release, version 1.7, arrives six months after 1.6. Mo... 4 天前
  56. 56 Go 1.8 Release Notes Introduction to Go 1.8 {#introduction} The latest Go release, version 1.8, arrives six months after Go 1.7.... 4 天前
  57. 57 Go 1.9 Release Notes Introduction to Go 1.9 {#introduction} The latest Go release, version 1.9, arrives six months after Go 1.8 ... 4 天前
  58. 58 Go 1 Release Notes Go version 1, Go 1 for short, defines a language and a set of core libraries that provide a stable foundati... 4 天前
  59. 59 go_faq 4 天前
  60. 60 help 4 天前
  61. 61 encoding/json/v2 Migration Guide Introduced in Go 1.27, the encoding/json/v2 package is a major revision of the original encoding/json packa... 4 天前
  62. 62 Next Release Notes Draft {{with docNext}}{{.}}{{else}}No next release note fragments available.{{end}} 4 天前
  63. 63 Profile-guided optimization Starting in Go 1.20, the Go compiler supports profile-guided optimization (PGO) to further optimize builds.... 4 天前
  64. 64 root 4 天前
  65. 65 Go Telemetry Table of Contents: Background Overview Configuration Counters Reporting and Uploading Charts Telemetry Pro... 4 天前
  66. 66 Go Toolchains Starting in Go 1.21, the Go distribution consists of a go command and a bundled Go toolchain, which is the... 4 天前
  67. 67 cancel-operations You can manage in-progress operations by using Go context.Context. A Context is a standard Go data value t... 4 天前
  68. 68 change-data When you perform database actions that don't return data, use an Exec or ExecContext method from the data... 4 天前
  69. 69 execute-transactions You can execute database transactions using an sql.Tx, which represents a transaction. In addition to Comm... 4 天前
  70. 70 index Using Go, you can incorporate a wide variety of databases and data access approaches into your applications... 4 天前
  71. 71 manage-connections For the vast majority of programs, you needn't adjust the sql.DB connection pool defaults. But for some ad... 4 天前
  72. 72 open-handle The database/sql package simplifies database access by reducing the need for you to manage connections. Un... 4 天前
  73. 73 prepared-statements You can define a prepared statement for repeated use. This can help your code run a bit faster by avoiding ... 4 天前
  74. 74 querying When executing an SQL statement that returns data, use one of the Query methods provided in the database/... 4 天前
  75. 75 sql-injection You can avoid an SQL injection risk by providing SQL parameter values as sql package function arguments. M... 4 天前
  76. 76 index redirect: /blog/gopher 4 天前
  77. 77 developing You can collect related packages into modules, then publish the modules for other developers to use. This t... 4 天前
  78. 78 gomod-ref Each Go module is defined by a go.mod file that describes the module's properties, including its dependenci... 4 天前
  79. 79 layout A common question developers new to Go have is "How do I organize my Go project?", in terms of the layout o... 4 天前
  80. 80 major-version You must update to a major version when changes you're making in a potential new version can't guarantee ba... 4 天前
  81. 81 managing-dependencies When your code uses external packages, those packages (distributed as modules) become dependencies. Over ti... 4 天前
  82. 82 managing-source When you're developing modules to publish for others to use, you can help ensure that your modules are easi... 4 天前
  83. 83 pruning 4 天前
  84. 84 publishing When you want to make a module available for other developers, you publish it so that it's visible to Go to... 4 天前
  85. 85 release-workflow When you develop modules for use by other developers, you can follow a workflow that helps ensure a reliabl... 4 天前
  86. 86 Introduction The release of Go version 1, Go 1 for short, is a major milestone in the development of the language. Go 1 ... 4 小时前
  87. 87 version-numbers A module's developer uses each part of a module's version number to signal the version’s stability and bac... 4 天前
  88. 88 Security Best Practices for Go Developers Back to Go Security This page provides Go developers with best practices for prioritizing the security of t... 4 天前
  89. 89 Go Security Decisions This document includes decisions the Go Security team has made about various commonly-reported issues. It m... 4 天前
  90. 90 FIPS 140-3 Compliance Starting with Go 1.24, Go binaries can natively operate in a mode that facilitates FIPS 140-3 compliance. M... 4 天前
  91. 91 index The Go programming language is an open source project to make programmers more productive. Go is expressive... 4 小时前
  92. 92 Security This page provides resources for Go developers to improve security for their projects. (See also: Security ... 4 天前
  93. 93 Go Security Policy This document explains the Go Security team's process for handling issues reported and what to expect in re... 4 天前
  94. 94 Go Threat Model This document defines the general threat model for the Go toolchain and standard library. In the absence of... 4 天前
  95. 95 install Download and install Go quickly with the steps described here. For other content on installing, you might b... 4 小时前
  96. 96 gccgo This document explains how to use gccgo, a compiler for the Go language. The gccgo compiler is a new fronte... 4 小时前
  97. 97 vulncheck redirect: /security/vuln/vulncheck 4 天前
  98. 98 source This topic describes how to build and run Go from source code. To install with an installer, see Download a... 4 天前
  99. 99 Go Fuzzing Go supports fuzzing in its standard toolchain beginning in Go 1.18. Native Go fuzz tests are supported by O... 4 天前
  100. 100 technical This document provides an overview of the technical details of the native fuzzing implementation, and is in... 4 天前
  101. 101 Go CNA Policy Back to Go Vulnerability Management Overview The Go CNA is a CVE Numbering Authority, which issues CVE IDs ... 4 天前
  102. 102 manage-install This topic describes how to install multiple versions of Go on the same machine, as well as how to uninstal... 4 小时前
  103. 103 Go Vulnerability Database Back to Go Vulnerability Management Overview The Go vulnerability database (https://vuln.go.dev) serves Go ... 4 天前
  104. 104 Vulnerability Scanning in IDEs Back to Go Security Editors integrated with the Go language server, such as VS Code with the Go extension, ... 4 天前
  105. 105 Go Vulnerability Management Back to Go Security Overview Go helps developers detect, assess, and resolve errors or weaknesses that are ... 4 天前
  106. 106 vulncheck redirect: https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck 4 天前
  107. 107 api redirect: /security/vuln/database 4 天前
  108. 108 index redirect: /security/vuln 4 天前
  109. 109 policy redirect: /security/vuln/cna 4 天前
  110. 110 database-access This tutorial introduces the basics of accessing a relational database with Go and the database/sql packag... 4 天前
  111. 111 fuzz This tutorial introduces the basics of fuzzing in Go. With fuzzing, random data is run against your test in... 4 天前
  112. 112 generics This tutorial introduces the basics of generics in Go. With generics, you can declare and use functions or ... 4 天前
  113. 113 govulncheck-ide Back to Go Security You can scan your code for vulnerabilities directly out of your editor with the Go exte... 4 天前
  114. 114 govulncheck Govulncheck is a low-noise tool that helps you find and fix vulnerable dependencies in your Go projects. It... 4 天前
  115. 115 json JSON (JavaScript Object Notation) is a simple data interchange format. Syntactically it resembles the objec... 4 天前
  116. 116 web-service-gin This tutorial introduces the basics of writing a RESTful web service API with Go and the Gin Web Framework ... 4 天前
  117. 117 workspaces This tutorial introduces the basics of multi-module workspaces in Go. With multi-module workspaces, you can... 4 天前
  118. 118 add-a-test Now that you've gotten your code to a stable place (nicely done, by the way), add a test. Testing your code... 4 小时前
  119. 119 call-module-code In the previous section, you created a greetings module. In this section, you'll write code to make calls ... 4 小时前
  120. 120 compile-install In this last topic, you'll learn a couple new go commands. While the go run command is a useful shortcut ... 4 小时前
  121. 121 create-module This is the first part of a tutorial that introduces a few fundamental features of the Go language. If you'... 4 小时前
  122. 122 getting-started In this tutorial, you'll get a brief introduction to Go programming. Along the way, you will: Install Go (i... 4 小时前
  123. 123 greetings-multiple-people In the last changes you'll make to your module's code, you'll add support for getting greetings for multipl... 4 小时前
  124. 124 handle-errors Handling errors is an essential feature of solid code. In this section, you'll add a bit of code to return ... 4 小时前
  125. 125 index If you're new to a part of Go, take a look at the tutorials linked below. If you haven't installed Go yet, ... 4 小时前
  126. 126 module-conclusion In this tutorial, you wrote functions that you packaged into two modules: one with logic for sending greeti... 4 小时前
  127. 127 random-greeting In this section, you'll change your code so that instead of returning a single greeting every time, it retu... 4 小时前