サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
アメリカ大統領選
pkg.go.dev
Tips for writing clear, performant, and idiomatic Go code
Go is a tool for managing Go source code. Usage: go <command> [arguments] The commands are: bug start a bug report build compile packages and dependencies clean remove object files and cached files doc show documentation for package or symbol env print Go environment information fix update packages to use new APIs fmt gofmt (reformat) package sources generate generate Go files by processing source
Package fmt implements formatted I/O with functions analogous to C's printf and scanf. The format 'verbs' are derived from C's but are simpler. Printing ¶The verbs: General: %v the value in a default format when printing structs, the plus flag (%+v) adds field names %#v a Go-syntax representation of the value (floating-point infinities and NaNs print as ±Inf and NaN) %T a Go-syntax representation
Rf refactors Go programs. Usage: rf [-diff] script Rf applies a script of refactoring commands to the package in the current directory. For example, to unexport a field in a struct by renaming it: rf 'mv T.Field T.field' By default, rf writes changes back to the disk. The -diff flag causes rf to print a diff of the intended changes instead. A script is a sequence of commands, one per line. Comment
Package time provides functionality for measuring and displaying time. The calendrical calculations always assume a Gregorian calendar, with no leap seconds. Monotonic Clocks ¶Operating systems provide both a “wall clock,” which is subject to changes for clock synchronization, and a “monotonic clock,” which is not. The general rule is that the wall clock is for telling time and the monotonic clock
Package analysis defines the interface between a modular static analysis and an analysis driver program. Background ¶A static analysis is a function that inspects a package of Go code and reports a set of diagnostics (typically mistakes in the code), and perhaps produces other results as well, such as suggested refactorings or other facts. An analysis that reports mistakes is informally called a "
Package storage provides an easy way to work with Google Cloud Storage. Google Cloud Storage stores data in named objects, which are grouped into buckets. More information about Google Cloud Storage is available at https://cloud.google.com/storage/docs. See https://pkg.go.dev/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. Creating a Client
Benchstat computes statistical summaries and A/B comparisons of Go benchmarks. Usage: benchstat [flags] inputs... Each input file should be in the Go benchmark format (https://golang.org/design/14313-benchmark-format), such as the output of “go test -bench .”. Typically, there should be two (or more) inputs files for before and after some change (or series of changes) to be measured. Each benchmar
Package template implements data-driven templates for generating textual output. To generate HTML output, see html/template, which has the same interface as this package but automatically secures HTML output against certain attacks. Templates are executed by applying them to a data structure. Annotations in the template refer to elements of the data structure (typically a field of a struct or a ke
Package firestore provides a client for reading and writing to a Cloud Firestore database. See https://cloud.google.com/firestore/docs for an introduction to Cloud Firestore and additional help on using the Firestore API. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. Note: you can't use both Cloud Firestore and Cloud
Package cloud is the root of the packages used to access Google Cloud Services. See https://pkg.go.dev/cloud.google.com/go for a full list of sub-modules. Client Options ¶All clients in sub-packages are configurable via client options. These options are described here: https://pkg.go.dev/google.golang.org/api/option. Endpoint Override ¶Endpoint configuration is used to specify the URL to which req
Package bigquery provides a client for the BigQuery service. The following assumes a basic familiarity with BigQuery concepts. See https://cloud.google.com/bigquery/docs. See https://godoc.org/cloud.google.com/go for authentication, timeouts, connection pooling and similar aspects of this package. Creating a Client ¶To start working with this package, create a client: ctx := context.Background() c
Package pubsub provides an easy way to publish and receive Google Cloud Pub/Sub messages, hiding the details of the underlying server RPCs. Google Cloud Pub/Sub is a many-to-many, asynchronous messaging system that decouples senders and receivers. More information about Google Cloud Pub/Sub is available at https://cloud.google.com/pubsub/docs See https://godoc.org/cloud.google.com/go for authentic
次のページ
このページを最初にブックマークしてみませんか?
『Go Packages - Go Packages』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く