func context.Background
184 uses
context (current package)
context.go#L208: func Background() Context {
cloud.google.com/go/compute/metadata
metadata.go#L123: ctx, cancel := context.WithCancel(context.Background())
cloud.google.com/go/logging
logging.go#L439: ctxFunc: func() (context.Context, func()) { return context.Background(), nil },
cloud.google.com/go/profiler
profiler.go#L235: ctx := context.Background()
contrib.go.opencensus.io/exporter/stackdriver
stackdriver.go#L311: ctx = context.Background()
stackdriver.go#L482: ctx = context.Background()
stats.go#L92: ctx = context.Background()
trace.go#L52: ctx = context.Background()
contrib.go.opencensus.io/exporter/stackdriver/monitoredresource/gcp
gcp_metadata_config.go#L91: ctx := context.Background()
contrib.go.opencensus.io/integrations/ocsql
dbstats_go1.11.go#L19: ctx = context.Background()
driver.go#L154: defer recordCallStats(context.Background(), "go.sql.exec")(err)
driver.go#L161: ctx, span := trace.StartSpan(context.Background(), "sql:exec", trace.WithSpanKind(trace.SpanKindClient))
driver.go#L234: defer recordCallStats(context.Background(), "go.sql.query")(err)
driver.go#L241: ctx, span := trace.StartSpan(context.Background(), "sql:query", trace.WithSpanKind(trace.SpanKindClient))
driver.go#L316: defer recordCallStats(context.Background(), "go.sql.prepare")(err)
driver.go#L319: _, span := trace.StartSpan(context.Background(), "sql:prepare", trace.WithSpanKind(trace.SpanKindClient))
driver.go#L398: ctx = context.Background()
driver.go#L482: defer recordCallStats(context.Background(), "go.sql.stmt.exec")(err)
driver.go#L488: ctx, span := trace.StartSpan(context.Background(), "sql:exec", trace.WithSpanKind(trace.SpanKindClient))
driver.go#L529: defer recordCallStats(context.Background(), "go.sql.stmt.query")(err)
driver.go#L535: ctx, span := trace.StartSpan(context.Background(), "sql:query", trace.WithSpanKind(trace.SpanKindClient))
driver.go#L803: defer recordCallStats(context.Background(), "go.sql.commit")(err)
driver.go#L819: defer recordCallStats(context.Background(), "go.sql.rollback")(err)
crypto/tls
tls.go#L115: return dial(context.Background(), dialer, network, addr, config)
tls.go#L228: return d.DialContext(context.Background(), network, addr)
database/sql
sql.go#L731: ctx, cancel := context.WithCancel(context.Background())
sql.go#L817: return db.PingContext(context.Background())
sql.go#L1479: return db.PrepareContext(context.Background(), query)
sql.go#L1549: return db.ExecContext(context.Background(), query, args...)
sql.go#L1619: return db.QueryContext(context.Background(), query, args...)
sql.go#L1717: return db.QueryRowContext(context.Background(), query, args...)
sql.go#L1748: return db.BeginTx(context.Background(), nil)
sql.go#L2253: return tx.PrepareContext(context.Background(), query)
sql.go#L2356: return tx.StmtContext(context.Background(), stmt)
sql.go#L2372: return tx.ExecContext(context.Background(), query, args...)
sql.go#L2387: return tx.QueryContext(context.Background(), query, args...)
sql.go#L2408: return tx.QueryRowContext(context.Background(), query, args...)
sql.go#L2514: return s.ExecContext(context.Background(), args...)
sql.go#L2685: return s.QueryContext(context.Background(), args...)
sql.go#L2724: return s.QueryRowContext(context.Background(), args...)
github.com/aws/aws-sdk-go/aws
context_background_1_7.go#L19: return context.Background()
github.com/aws/aws-sdk-go/aws/credentials
context_background_go1.7.go#L19: return context.Background()
github.com/go-git/go-git/v5
remote.go#L74: return r.PushContext(context.Background(), o)
remote.go#L283: return r.FetchContext(context.Background(), o)
repository.go#L194: return CloneContext(context.Background(), s, worktree, o)
repository.go#L337: return PlainCloneContext(context.Background(), path, isBare, o)
repository.go#L1036: return r.FetchContext(context.Background(), o)
repository.go#L1065: return r.PushContext(context.Background(), o)
submodule.go#L146: return s.UpdateContext(context.Background(), o)
submodule.go#L259: return s.UpdateContext(context.Background(), o)
worktree.go#L52: return w.PullContext(context.Background(), o)
github.com/go-git/go-git/v5/plumbing/object
change.go#L87: return c.PatchContext(context.Background())
change.go#L150: return c.PatchContext(context.Background())
commit.go#L106: return c.PatchContext(context.Background(), to)
commit.go#L315: return c.StatsContext(context.Background())
difftree.go#L16: return DiffTreeContext(context.Background(), a, b)
patch.go#L25: ctx := context.Background()
patch.go#L100: return filePatchWithContext(context.Background(), c)
tree.go#L308: return t.DiffContext(context.Background(), to)
tree.go#L323: return t.PatchContext(context.Background(), to)
github.com/go-git/go-git/v5/plumbing/transport/ssh
common.go#L137: ctx = context.Background()
github.com/go-git/go-git/v5/utils/merkletrie
difftree.go#L270: return DiffTreeContext(context.Background(), fromTree, toTree, hashEqual)
github.com/go-redis/redis/v8
cluster.go#L695: ctx: context.Background(),
commands.go#L2310: cmd := NewSlowLogCmd(context.Background(), "slowlog", "get", num)
pubsub.go#L475: return context.Background()
redis.go#L533: ctx: context.Background(),
ring.go#L313: ctx := context.Background()
ring.go#L321: internal.Logger.Printf(context.Background(), "ring shard state changed: %s", shard)
ring.go#L420: ctx: context.Background(),
sentinel.go#L188: ctx: context.Background(),
sentinel.go#L237: ctx: context.Background(),
github.com/go-redis/redis/v8/internal
instruments.go#L20: Logger.Printf(context.Background(), "Error creating meter github.com/go-redis/redis for Instruments", r)
github.com/go-redis/redis/v8/internal/pool
pool.go#L200: conn, err := p.opt.Dialer(context.Background())
pool.go#L463: internal.Logger.Printf(context.Background(), "ReapStaleConns failed: %s", err)
github.com/golang-migrate/migrate/v4/database/postgres
postgres.go#L89: conn, err := instance.Conn(context.Background())
postgres.go#L156: if _, err := p.conn.ExecContext(context.Background(), query, aid); err != nil {
postgres.go#L175: if _, err := p.conn.ExecContext(context.Background(), query, aid); err != nil {
postgres.go#L190: if _, err := p.conn.ExecContext(context.Background(), query); err != nil {
postgres.go#L251: tx, err := p.conn.BeginTx(context.Background(), &sql.TxOptions{})
postgres.go#L283: err = p.conn.QueryRowContext(context.Background(), query).Scan(&version, &dirty)
postgres.go#L304: tables, err := p.conn.QueryContext(context.Background(), query)
postgres.go#L330: if _, err := p.conn.ExecContext(context.Background(), query); err != nil {
postgres.go#L358: if _, err = p.conn.ExecContext(context.Background(), query); err != nil {
github.com/jackc/pgconn
pgconn.go#L389: if ctx != context.Background() {
pgconn.go#L421: if ctx != context.Background() {
pgconn.go#L551: if ctx != context.Background() {
pgconn.go#L588: ctx, cancel := context.WithDeadline(context.Background(), deadline)
pgconn.go#L745: if ctx != context.Background() {
pgconn.go#L840: if ctx != context.Background() {
pgconn.go#L875: if ctx != context.Background() {
pgconn.go#L917: if ctx != context.Background() {
pgconn.go#L963: if ctx != context.Background() {
pgconn.go#L1058: if ctx != context.Background() {
pgconn.go#L1097: if ctx != context.Background() {
pgconn.go#L1158: if ctx != context.Background() {
pgconn.go#L1600: if ctx != context.Background() {
github.com/jackc/pgx/v4
conn.go#L336: ctx, cancel := context.WithCancel(context.Background())
github.com/jackc/pgx/v4/stdlib
sql.go#L175: ctx, cancel := context.WithTimeout(context.Background(), 60*time.Second) // Ensure eventual timeout
sql.go#L259: return c.PrepareContext(context.Background(), query)
sql.go#L279: ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
sql.go#L285: return c.BeginTx(context.Background(), driver.TxOptions{})
sql.go#L401: ctx, cancel := context.WithTimeout(context.Background(), time.Second*5)
sql.go#L753: ctx := context.WithValue(context.Background(), ctxKeyFakeTx, &conn)
sql.go#L776: ctx, cancel := context.WithTimeout(context.Background(), time.Second)
github.com/lib/pq
conn.go#L108: ctx, cancel := context.WithTimeout(context.Background(), timeout)
conn.go#L276: return c.open(context.Background())
conn_go18.go#L100: ctxCancel, cancel := context.WithTimeout(context.Background(), time.Second*10)
go.opencensus.io/metric/metricexport
reader.go#L178: ctx, span := trace.StartSpan(context.Background(), r.spanName, trace.WithSampler(r.sampler))
golang.org/x/net/context
go17.go#L17: background = context.Background()
golang.org/x/net/http2
server.go#L328: return context.Background()
transport.go#L713: ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
golang.org/x/net/internal/socks
client.go#L30: if ctx != context.Background() {
socks.go#L218: c, err = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress)
socks.go#L226: if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil {
golang.org/x/pkgsite/cmd/frontend
main.go#L49: ctx := context.Background()
golang.org/x/pkgsite/cmd/pkgsite
main.go#L49: ctx := context.Background()
golang.org/x/pkgsite/cmd/prober
main.go#L158: log.Fatalf(context.Background(), "duplicate probe name %q", p.Name)
main.go#L202: ctx := context.Background()
main.go#L339: ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
golang.org/x/pkgsite/cmd/worker
main.go#L48: ctx := context.Background()
golang.org/x/pkgsite/internal/database
database.go#L52: ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
golang.org/x/pkgsite/internal/dcensus
dcensus.go#L90: exportToStackdriver(context.Background(), cfg)
dcensus.go#L181: log.Warningf(context.Background(), "Stackdriver view exporter: %v", err)
debug.go#L25: log.Debugf(context.Background(), "trace exporter: onError called with %v", err)
debug.go#L31: ctx := context.Background()
golang.org/x/pkgsite/internal/fetch
load.go#L391: ctx := context.Background()
golang.org/x/pkgsite/internal/frontend
server.go#L101: errorPageBytes, err := s.renderErrorPage(context.Background(), http.StatusInternalServerError, "error.tmpl", nil)
server.go#L315: buf, err := s.renderErrorPage(context.Background(), status, "error.tmpl", nil)
server.go#L607: ctx := context.Background()
unit.go#L148: ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
golang.org/x/pkgsite/internal/licenses
licenses.go#L218: log.Fatalf(context.Background(), "%s is an exception type that is not redistributable.", t)
licenses.go#L289: log.Fatalf(context.Background(), "licensecheck.NewScanner: %v", err)
golang.org/x/pkgsite/internal/middleware
caching.go#L198: setCtx, cancelSet := context.WithTimeout(context.Background(), 1*time.Second)
requestlog.go#L38: log.Info(context.Background(), msg.String())
golang.org/x/pkgsite/internal/postgres
postgres.go#L49: log.Errorf(context.Background(), "getting excluded prefixes: %v", err)
postgres.go#L51: ctx, cancel := context.WithCancel(context.Background())
test_helper.go#L108: ctx := context.Background()
golang.org/x/pkgsite/internal/testing/sample
sample.go#L383: src, err := docPkg.Encode(context.Background())
golang.org/x/pkgsite/internal/worker
memory.go#L122: log.Warningf(context.Background(), "getCgroupMemStats: %v", err)
server.go#L679: log.Fatalf(context.Background(), "time.LoadLocation: %v", err)
google.golang.org/grpc
clientconn.go#L104: return DialContext(context.Background(), target, opts...)
clientconn.go#L134: cc.ctx, cc.cancel = context.WithCancel(context.Background())
google.golang.org/grpc/balancer/grpclb
grpclb_remote_balancer.go#L245: cc, err := grpc.DialContext(context.Background(), lb.manualResolver.Scheme()+":///grpclb.subClientConn", dopts...)
grpclb_remote_balancer.go#L323: ctx, cancel := context.WithCancel(context.Background())
google.golang.org/grpc/credentials/alts
alts.go#L236: ctx, cancel := context.WithTimeout(context.Background(), defaultTimeout)
google.golang.org/grpc/credentials/google
google.go#L45: ctx, cancel := context.WithTimeout(context.Background(), tokenRequestTimeout)
google.golang.org/grpc/internal/resolver/dns
dns_resolver.go#L124: ctx, cancel := context.WithCancel(context.Background())
google.golang.org/grpc/internal/transport
http2_server.go#L214: ctx: context.Background(),
net
dial.go#L348: return d.DialContext(context.Background(), network, address)
dial.go#L706: return lc.Listen(context.Background(), network, address)
dial.go#L733: return lc.ListenPacket(context.Background(), network, address)
fd_unix.go#L99: if ctx != context.Background() {
iprawsock.go#L81: afnet, _, err := parseNetwork(context.Background(), network, false)
iprawsock.go#L90: addrs, err := DefaultResolver.internetAddrList(context.Background(), afnet, address)
iprawsock.go#L216: c, err := sd.dialIP(context.Background(), laddr, raddr)
iprawsock.go#L235: c, err := sl.listenIP(context.Background(), laddr)
lookup.go#L170: return DefaultResolver.LookupHost(context.Background(), host)
lookup.go#L190: addrs, err := DefaultResolver.LookupIPAddr(context.Background(), host)
lookup.go#L256: return &onlyValuesCtx{Context: context.Background(), lookupValues: lookupCtx}
lookup.go#L357: return DefaultResolver.LookupPort(context.Background(), network, service)
lookup.go#L393: return DefaultResolver.lookupCNAME(context.Background(), host)
lookup.go#L420: return DefaultResolver.lookupSRV(context.Background(), service, proto, name)
lookup.go#L438: return DefaultResolver.lookupMX(context.Background(), name)
lookup.go#L448: return DefaultResolver.lookupNS(context.Background(), name)
lookup.go#L458: return DefaultResolver.lookupTXT(context.Background(), name)
lookup.go#L472: return DefaultResolver.lookupAddr(context.Background(), addr)
tcpsock.go#L76: addrs, err := DefaultResolver.internetAddrList(context.Background(), network, address)
tcpsock.go#L216: c, err := sd.dialTCP(context.Background(), laddr, raddr)
tcpsock.go#L334: ln, err := sl.listenTCP(context.Background(), laddr)
udpsock.go#L79: addrs, err := DefaultResolver.internetAddrList(context.Background(), network, address)
udpsock.go#L212: c, err := sd.dialUDP(context.Background(), laddr, raddr)
udpsock.go#L238: c, err := sl.listenUDP(context.Background(), laddr)
udpsock.go#L275: c, err := sl.listenMulticastUDP(context.Background(), ifi, gaddr)
unixsock.go#L210: c, err := sd.dialUnix(context.Background(), laddr, raddr)
unixsock.go#L327: ln, err := sl.listenUnix(context.Background(), laddr)
unixsock.go#L347: c, err := sl.listenUnixgram(context.Background(), laddr)
net/http
h2_bundle.go#L3894: return context.Background()
h2_bundle.go#L7216: ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
request.go#L340: return context.Background()
request.go#L828: return NewRequestWithContext(context.Background(), method, url, body)
server.go#L2969: baseCtx := context.Background()
socks_bundle.go#L36: if ctx != context.Background() {
socks_bundle.go#L374: c, err = d.ProxyDial(context.Background(), d.proxyNetwork, d.proxyAddress)
socks_bundle.go#L382: if _, err := d.DialWithConn(context.Background(), c, network, address); err != nil {
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |