text stringlengths 2 1.1M | id stringlengths 11 117 | metadata dict | __index_level_0__ int64 0 885 |
|---|---|---|---|
// Objective-C API for talking to interfaces Go package.
// gobind -lang=objc interfaces
//
// File is generated by gobind. Do not edit.
#ifndef __GO_interfaces_H__
#define __GO_interfaces_H__
#include <stdint.h>
#include <objc/objc.h>
int32_t cproxyinterfaces_Error_Err(int32_t refnum);
int32_t cproxyinterfaces_I_... | mobile/bind/testdata/interfaces.objc.go.h.golden/0 | {
"file_path": "mobile/bind/testdata/interfaces.objc.go.h.golden",
"repo_id": "mobile",
"token_count": 274
} | 600 |
// Objective-C API for talking to issue12328 Go package.
// gobind -lang=objc issue12328
//
// File is generated by gobind. Do not edit.
#ifndef __GO_issue12328_H__
#define __GO_issue12328_H__
#include <stdint.h>
#include <objc/objc.h>
#endif
| mobile/bind/testdata/issue12328.objc.go.h.golden/0 | {
"file_path": "mobile/bind/testdata/issue12328.objc.go.h.golden",
"repo_id": "mobile",
"token_count": 96
} | 601 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package objcpkg
import (
"ObjC/Foundation/NSDate"
"ObjC/Foundation/NSString"
"ObjC/QuartzCore/CAMediaTimingFunction"
)
func Func() {
NSDate.Date()
CAMedi... | mobile/bind/testdata/testpkg/objcpkg/objc.go/0 | {
"file_path": "mobile/bind/testdata/testpkg/objcpkg/objc.go",
"repo_id": "mobile",
"token_count": 388
} | 602 |
// Code generated by gobind. DO NOT EDIT.
// JNI functions for the Go <=> Java bridge.
//
// autogenerated by gobind -lang=java underscores
#include <android/log.h>
#include <stdint.h>
#include "seq.h"
#include "_cgo_export.h"
#include "underscore_pkg.h"
jclass proxy_class_underscore_pkg_Underscore_struct;
jmethod... | mobile/bind/testdata/underscores.java.c.golden/0 | {
"file_path": "mobile/bind/testdata/underscores.java.c.golden",
"repo_id": "mobile",
"token_count": 882
} | 603 |
// Code generated by gobind. DO NOT EDIT.
// Java class vars.S is a proxy for talking to a Go program.
//
// autogenerated by gobind -lang=java vars
package vars;
import go.Seq;
public final class S implements Seq.Proxy, I {
static { Vars.touch(); }
private final int refnum;
@Override public ... | mobile/bind/testdata/vars.java.golden/0 | {
"file_path": "mobile/bind/testdata/vars.java.golden",
"repo_id": "mobile",
"token_count": 1321
} | 604 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"bytes"
"crypto/x509"
"encoding/base64"
"encoding/pem"
"encoding/xml"
"errors"
"fmt"
"io"
"io/ioutil"
"log"
"os"
"path"
"pa... | mobile/cmd/gomobile/build_androidapp.go/0 | {
"file_path": "mobile/cmd/gomobile/build_androidapp.go",
"repo_id": "mobile",
"token_count": 4714
} | 605 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"encoding/xml"
"errors"
"fmt"
"html/template"
)
type manifestXML struct {
Activity activityXML `xml:"application>activity"`
}
typ... | mobile/cmd/gomobile/manifest.go/0 | {
"file_path": "mobile/cmd/gomobile/manifest.go",
"repo_id": "mobile",
"token_count": 732
} | 606 |
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifi... | mobile/example/bind/ios/bind/Info.plist/0 | {
"file_path": "mobile/example/bind/ios/bind/Info.plist",
"repo_id": "mobile",
"token_count": 598
} | 607 |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="match_parent"
tools:context="org.golang.ivy.Help"
android:background="@color/body">
<WebView
android:id="@+... | mobile/example/ivy/android/app/src/main/res/layout/activity_help.xml/0 | {
"file_path": "mobile/example/ivy/android/app/src/main/res/layout/activity_help.xml",
"repo_id": "mobile",
"token_count": 197
} | 608 |
include ':app'
| mobile/example/ivy/android/settings.gradle/0 | {
"file_path": "mobile/example/ivy/android/settings.gradle",
"repo_id": "mobile",
"token_count": 6
} | 609 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
// An app that paints green if golang.org is reachable when the app first
// starts, or red otherwise.
//
// In order to ... | mobile/example/network/main.go/0 | {
"file_path": "mobile/example/network/main.go",
"repo_id": "mobile",
"token_count": 1078
} | 610 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package f32
import "fmt"
// A Mat3 is a 3x3 matrix of float32 values.
// Elements are indexed first by row then column, i.e. m[row][column].
type Mat3 [3]Vec3... | mobile/exp/f32/mat3.go/0 | {
"file_path": "mobile/exp/f32/mat3.go",
"repo_id": "mobile",
"token_count": 981
} | 611 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build darwin || linux || windows
package glutil // import "golang.org/x/mobile/exp/gl/glutil"
import (
"fmt"
"golang.org/x/mobile/exp/f32"
"golang.or... | mobile/exp/gl/glutil/glutil.go/0 | {
"file_path": "mobile/exp/gl/glutil/glutil.go",
"repo_id": "mobile",
"token_count": 905
} | 612 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gl
import (
"archive/tar"
"compress/gzip"
"debug/pe"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
"os"
"path/filepath"
"runtime"
)
var debug = l... | mobile/gl/dll_windows.go/0 | {
"file_path": "mobile/gl/dll_windows.go",
"repo_id": "mobile",
"token_count": 2650
} | 613 |
module golang.org/x/mobile
go 1.18
require (
golang.org/x/exp/shiny v0.0.0-20230817173708-d852ddb80c63
golang.org/x/image v0.18.0
golang.org/x/mod v0.19.0
golang.org/x/sync v0.7.0
golang.org/x/tools v0.23.0
)
require golang.org/x/sys v0.22.0 // indirect
| mobile/go.mod/0 | {
"file_path": "mobile/go.mod",
"repo_id": "mobile",
"token_count": 145
} | 614 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// The importers package uses go/ast to analyze Go packages or Go files
// and collect references to types whose package has a package prefix.
// It is used by... | mobile/internal/importers/ast.go/0 | {
"file_path": "mobile/internal/importers/ast.go",
"repo_id": "mobile",
"token_count": 2371
} | 615 |
# Release automation via GoReleaser (goreleaser.com)
# Requires a valid GITHUB_TOKEN envar prior to running `goreleaser`
# See https://goreleaser.com/environment/ for more info
---
release:
github:
owner: golang
name: mock
builds:
- binary: mockgen
goos:
- darwin
- windows
- linux
... | mock/.goreleaser.yml/0 | {
"file_path": "mock/.goreleaser.yml",
"repo_id": "mock",
"token_count": 362
} | 616 |
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in w... | mock/gomock/doc.go/0 | {
"file_path": "mock/gomock/doc.go",
"repo_id": "mock",
"token_count": 813
} | 617 |
// Code generated by MockGen. DO NOT EDIT.
// Source: bugreport.go
// Package bugreport is a generated GoMock package.
package bugreport
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
)
// MockExample is a mock of Example interface.
type MockExample struct {
ctrl *gomock.Controller
record... | mock/mockgen/internal/tests/generated_identifier_conflict/bugreport_mock.go/0 | {
"file_path": "mock/mockgen/internal/tests/generated_identifier_conflict/bugreport_mock.go",
"repo_id": "mock",
"token_count": 735
} | 618 |
// Code generated by MockGen. DO NOT EDIT.
// Source: user.go
// Package users_test is a generated GoMock package.
package users_test
import (
reflect "reflect"
gomock "github.com/golang/mock/gomock"
users "github.com/golang/mock/mockgen/internal/tests/mock_in_test_package"
)
// MockFinder is a mock of Finder in... | mock/mockgen/internal/tests/mock_in_test_package/mock_test.go/0 | {
"file_path": "mock/mockgen/internal/tests/mock_in_test_package/mock_test.go",
"repo_id": "mock",
"token_count": 645
} | 619 |
// Copyright 2012 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in ... | mock/mockgen/model/model.go/0 | {
"file_path": "mock/mockgen/model/model.go",
"repo_id": "mock",
"token_count": 4950
} | 620 |
// A test that uses a mock.
package user_test
import (
"testing"
"github.com/golang/mock/gomock"
user "github.com/golang/mock/sample"
"github.com/golang/mock/sample/imp1"
)
func TestRemember(t *testing.T) {
ctrl := gomock.NewController(t)
defer ctrl.Finish()
mockIndex := NewMockIndex(ctrl)
mockIndex.EXPECT(... | mock/sample/user_test.go/0 | {
"file_path": "mock/sample/user_test.go",
"repo_id": "mock",
"token_count": 2153
} | 621 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package bpf_test
import (
"net"
"testing"
"golang.org/x/net/bpf"
"golang.org/x/net/ipv4"
)
func TestVMLoadAbsoluteOffsetOutOfBounds(t *testing.T) {
pkt ... | net/bpf/vm_load_test.go/0 | {
"file_path": "net/bpf/vm_load_test.go",
"repo_id": "net",
"token_count": 2526
} | 622 |
These test cases come from
http://www.w3.org/International/tests/repository/html5/the-input-byte-stream/results-basics
Distributed under both the W3C Test Suite License
(http://www.w3.org/Consortium/Legal/2008/04-testsuite-license)
and the W3C 3-clause BSD License
(http://www.w3.org/Consortium/Legal/2008/03-bsd-licens... | net/html/charset/testdata/README/0 | {
"file_path": "net/html/charset/testdata/README",
"repo_id": "net",
"token_count": 153
} | 623 |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package html
import (
"strings"
)
func adjustAttributeNames(aa []Attribute, nameMap map[string]string) {
for i := range aa {
if newName, ok := nameMap[aa[... | net/html/foreign.go/0 | {
"file_path": "net/html/foreign.go",
"repo_id": "net",
"token_count": 3188
} | 624 |
#data
<!doctype html><p>foo<address>bar<p>baz
#errors
(1,39): expected-closing-tag-but-got-eof
30: Unclosed element “address”.
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <p>
| "foo"
| <address>
| "bar"
| <p>
| "baz"
#data
<!doctype html><address><p>foo</address>bar
#... | net/html/testdata/webkit/blocks.dat/0 | {
"file_path": "net/html/testdata/webkit/blocks.dat",
"repo_id": "net",
"token_count": 6125
} | 625 |
#data
<input type="hidden"><frameset>
#errors
(1,21): expected-doctype-but-got-start-tag
(1,31): unexpected-start-tag
(1,31): eof-in-frameset
#document
| <html>
| <head>
| <frameset>
#data
<!DOCTYPE html><table><caption><svg>foo</table>bar
#errors
(1,47): unexpected-end-tag
(1,47): end-table-tag-in-caption
#docume... | net/html/testdata/webkit/pending-spec-changes.dat/0 | {
"file_path": "net/html/testdata/webkit/pending-spec-changes.dat",
"repo_id": "net",
"token_count": 463
} | 626 |
#data
<!doctype html><script>
#errors
(1,23): expected-named-closing-tag-but-got-eof
#document
| <!DOCTYPE html>
| <html>
| <head>
| <script>
| <body>
#data
<!doctype html><script>a
#errors
(1,24): expected-named-closing-tag-but-got-eof
#document
| <!DOCTYPE html>
| <html>
| <head>
| <script>
| "a"... | net/html/testdata/webkit/tests16.dat/0 | {
"file_path": "net/html/testdata/webkit/tests16.dat",
"repo_id": "net",
"token_count": 22579
} | 627 |
#data
<!doctype html><body><title>X</title>
#errors
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <title>
| "X"
#data
<!doctype html><table><title>X</title></table>
#errors
(1,29): unexpected-start-tag-implies-table-voodoo
#document
| <!DOCTYPE html>
| <html>
| <head>
| <body>
| <title... | net/html/testdata/webkit/tests7.dat/0 | {
"file_path": "net/html/testdata/webkit/tests7.dat",
"repo_id": "net",
"token_count": 3496
} | 628 |
// Copyright 2024 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http2
import "context"
// An gate is a monitor (mutex + condition variable) with one bit of state.
//
// The condition may be either set or unset.
// L... | net/http2/gate_test.go/0 | {
"file_path": "net/http2/gate_test.go",
"repo_id": "net",
"token_count": 652
} | 629 |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package hpack
import (
"bufio"
"regexp"
"strconv"
"strings"
"testing"
)
func TestHeaderFieldTable(t *testing.T) {
table := &headerFieldTable{}
table.in... | net/http2/hpack/tables_test.go/0 | {
"file_path": "net/http2/hpack/tables_test.go",
"repo_id": "net",
"token_count": 5190
} | 630 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package http2
import (
"bytes"
"fmt"
"sort"
"testing"
)
func defaultPriorityWriteScheduler() *priorityWriteScheduler {
return NewPriorityWriteScheduler(n... | net/http2/writesched_priority_test.go/0 | {
"file_path": "net/http2/writesched_priority_test.go",
"repo_id": "net",
"token_count": 7645
} | 631 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package icmp
import (
"encoding/binary"
"net"
"reflect"
"runtime"
"testing"
"golang.org/x/net/internal/socket"
"golang.org/x/net/ipv4"
)
func TestPars... | net/icmp/ipv4_test.go/0 | {
"file_path": "net/icmp/ipv4_test.go",
"repo_id": "net",
"token_count": 891
} | 632 |
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.10
// Package idna implements IDNA2008 using the compatibility pr... | net/idna/idna10.0.0.go/0 | {
"file_path": "net/idna/idna10.0.0.go",
"repo_id": "net",
"token_count": 7975
} | 633 |
// go generate gen.go
// Code generated by the command above; DO NOT EDIT.
// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
package iana // import "golang.org/x/net/internal/iana"
// Differentiated Services Field Codepoints (DSCP), Updated: 2018-05-04
const... | net/internal/iana/const.go/0 | {
"file_path": "net/internal/iana/const.go",
"repo_id": "net",
"token_count": 5697
} | 634 |
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build aix || windows || zos
package socket
import (
"syscall"
)
// ioComplete checks the flags and result of a syscall, to be used as return
// value i... | net/internal/socket/complete_nodontwait.go/0 | {
"file_path": "net/internal/socket/complete_nodontwait.go",
"repo_id": "net",
"token_count": 178
} | 635 |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !aix && !linux && !netbsd
package socket
import "net"
type mmsghdr struct{}
type mmsghdrs []mmsghdr
func (hs mmsghdrs) pack(ms []Message, parseF... | net/internal/socket/mmsghdr_stub.go/0 | {
"file_path": "net/internal/socket/mmsghdr_stub.go",
"repo_id": "net",
"token_count": 194
} | 636 |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !linux
package socket
func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
return 0, errNotImplemented
}
func (c *Conn) sendMsgs(ms []... | net/internal/socket/rawconn_nommsg.go/0 | {
"file_path": "net/internal/socket/rawconn_nommsg.go",
"repo_id": "net",
"token_count": 127
} | 637 |
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_aix.go
// Added for go1.11 compatibility
//go:build aix
package socket
type iovec struct {
Base *byte
Len uint64
}
type msghdr struct {
Name *byte
Namelen uint32
Iov *iovec
Iovlen int32
Control *byte
Controllen ui... | net/internal/socket/zsys_aix_ppc64.go/0 | {
"file_path": "net/internal/socket/zsys_aix_ppc64.go",
"repo_id": "net",
"token_count": 262
} | 638 |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv4_test
import (
"bytes"
"fmt"
"net"
"os"
"runtime"
"testing"
"golang.org/x/net/icmp"
"golang.org/x/net/internal/iana"
"golang.org/x/net/ip... | net/ipv4/multicast_test.go/0 | {
"file_path": "net/ipv4/multicast_test.go",
"repo_id": "net",
"token_count": 4882
} | 639 |
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_darwin.go
package ipv4
const (
sizeofSockaddrStorage = 0x80
sizeofSockaddrInet = 0x10
sizeofInetPktinfo = 0xc
sizeofIPMreq = 0x8
sizeofIPMreqSource = 0xc
sizeofGroupReq = 0x84
sizeofGroupSourceReq = 0x104
)
type soc... | net/ipv4/zsys_darwin.go/0 | {
"file_path": "net/ipv4/zsys_darwin.go",
"repo_id": "net",
"token_count": 480
} | 640 |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
package ipv6
import "golang.org/x/net/internal/socket"
func ... | net/ipv6/control_unix.go/0 | {
"file_path": "net/ipv6/control_unix.go",
"repo_id": "net",
"token_count": 575
} | 641 |
// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ipv6_test
import (
"errors"
"net"
"reflect"
"runtime"
"testing"
"golang.org/x/net/ipv6"
"golang.org/x/net/nettest"
)
var icmpStringTests = []s... | net/ipv6/icmp_test.go/0 | {
"file_path": "net/ipv6/icmp_test.go",
"repo_id": "net",
"token_count": 955
} | 642 |
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
// cgo -godefs defs_aix.go
// Added for go1.11 compatibility
//go:build aix
package ipv6
const (
sizeofSockaddrStorage = 0x508
sizeofSockaddrInet6 = 0x1c
sizeofInet6Pktinfo = 0x14
sizeofIPv6Mtuinfo = 0x20
sizeofIPv6Mreq = 0x14
sizeofGroupReq ... | net/ipv6/zsys_aix_ppc64.go/0 | {
"file_path": "net/ipv6/zsys_aix_ppc64.go",
"repo_id": "net",
"token_count": 516
} | 643 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build solaris
package lif
import (
"fmt"
"syscall"
"testing"
)
func (ll *Link) String() string {
return fmt.Sprintf("name=%s index=%d type=%d flags=... | net/lif/link_test.go/0 | {
"file_path": "net/lif/link_test.go",
"repo_id": "net",
"token_count": 666
} | 644 |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proxy
import (
"context"
"net"
"strings"
)
// A PerHost directs connections to a default Dialer unless the host name
// requested matches one of a ... | net/proxy/per_host.go/0 | {
"file_path": "net/proxy/per_host.go",
"repo_id": "net",
"token_count": 1484
} | 645 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package quic
import (
"time"
)
// ackState tracks packets received from a peer within a number space.
// It handles packet deduplication (... | net/quic/acks.go/0 | {
"file_path": "net/quic/acks.go",
"repo_id": "net",
"token_count": 2406
} | 646 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package quic
import "fmt"
// handleAckOrLoss deals with the final fate of a packet we sent:
// Either the peer acknowledges it, or we decla... | net/quic/conn_loss.go/0 | {
"file_path": "net/quic/conn_loss.go",
"repo_id": "net",
"token_count": 1093
} | 647 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package quic
import (
"fmt"
"log/slog"
"strconv"
"time"
)
// A debugFrame is a representation of the contents of a QUIC frame,
// used ... | net/quic/frame_debug.go/0 | {
"file_path": "net/quic/frame_debug.go",
"repo_id": "net",
"token_count": 7237
} | 648 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package quic
// A packetNumber is a QUIC packet number.
// Packet numbers are integers in the range [0, 2^62-1].
//
// https://www.rfc-edito... | net/quic/packet_number.go/0 | {
"file_path": "net/quic/packet_number.go",
"repo_id": "net",
"token_count": 814
} | 649 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package qlog
import (
"bytes"
"errors"
"fmt"
"log/slog"
"strings"
"sync"
"testing"
"time"
)
type testJSONOut struct {
bytes.Buffer... | net/quic/qlog/json_writer_test.go/0 | {
"file_path": "net/quic/qlog/json_writer_test.go",
"repo_id": "net",
"token_count": 1989
} | 650 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21
package quic
import "testing"
func TestSentPacketListSlidingWindow(t *testing.T) {
// Record 1000 sent packets, acking everything outside ... | net/quic/sent_packet_list_test.go/0 | {
"file_path": "net/quic/sent_packet_list_test.go",
"repo_id": "net",
"token_count": 1237
} | 651 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build go1.21 && darwin
package quic
import (
"encoding/binary"
"golang.org/x/sys/unix"
)
// See udp.go.
const (
udpECNSupport = true
u... | net/quic/udp_darwin.go/0 | {
"file_path": "net/quic/udp_darwin.go",
"repo_id": "net",
"token_count": 411
} | 652 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package trace
import (
"bytes"
"fmt"
"html/template"
"io"
"log"
"net/http"
"runtime"
"sort"
"strconv"
"strings"
"sync"
"sync/atomic"
"text/tabwrit... | net/trace/events.go/0 | {
"file_path": "net/trace/events.go",
"repo_id": "net",
"token_count": 5114
} | 653 |
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package xml
import (
"fmt"
"reflect"
"strings"
"sync"
)
// typeInfo holds details for the xml representation of a type.
type typeInfo struct {
xmlname *f... | net/webdav/internal/xml/typeinfo.go/0 | {
"file_path": "net/webdav/internal/xml/typeinfo.go",
"repo_id": "net",
"token_count": 3846
} | 654 |
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package websocket_test
import (
"io"
"net/http"
"golang.org/x/net/websocket"
)
// Echo the data received on the WebSocket.
func EchoServer(ws *websocket.C... | net/websocket/examplehandler_test.go/0 | {
"file_path": "net/websocket/examplehandler_test.go",
"repo_id": "net",
"token_count": 201
} | 655 |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package endpoints provides constants for using OAuth2 to access various services.
package endpoints
import (
"strings"
"golang.org/x/oauth2"
)
// Amazon... | oauth2/endpoints/endpoints.go/0 | {
"file_path": "oauth2/endpoints/endpoints.go",
"repo_id": "oauth2",
"token_count": 3171
} | 656 |
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package downscope_test
import (
"context"
"fmt"
"golang.org/x/oauth2/google"
"golang.org/x/oauth2"
"golang.org/x/oauth2/google/downscope"
)
func Exampl... | oauth2/google/downscope/tokenbroker_test.go/0 | {
"file_path": "oauth2/google/downscope/tokenbroker_test.go",
"repo_id": "oauth2",
"token_count": 577
} | 657 |
{
"SubjToken": "321road"
}
| oauth2/google/externalaccount/testdata/3pi_cred.json/0 | {
"file_path": "oauth2/google/externalaccount/testdata/3pi_cred.json",
"repo_id": "oauth2",
"token_count": 15
} | 658 |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package google
import (
"reflect"
"strings"
"testing"
)
func TestSDKConfig(t *testing.T) {
sdkConfigPath = func() (string, error) {
return "testdata/gcl... | oauth2/google/sdk_test.go/0 | {
"file_path": "oauth2/google/sdk_test.go",
"repo_id": "oauth2",
"token_count": 997
} | 659 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly
// known as "two-legged OAuth 2.0".
//
// See: https://tools.ietf.org/html/draft-ietf-oaut... | oauth2/jwt/jwt.go/0 | {
"file_path": "oauth2/jwt/jwt.go",
"repo_id": "oauth2",
"token_count": 1966
} | 660 |
# Proposal: Dense mark bits and sweep-free allocation
or, *How I learned to stop worrying and love the bitmap*
Author: Austin Clements
Last updated: 2015-09-30
Discussion at https://golang.org/issue/12800.
## Abstract
This document proposes a change to memory allocation to eliminate the
need for the sweeper and a... | proposal/design/12800-sweep-free-alloc.md/0 | {
"file_path": "proposal/design/12800-sweep-free-alloc.md",
"repo_id": "proposal",
"token_count": 4783
} | 661 |
# Proposal: Go Benchmark Data Format
Authors: Russ Cox, Austin Clements
Last updated: February 2016
Discussion at [golang.org/issue/14313](https://golang.org/issue/14313).
## Abstract
We propose to make the current output of `go test -bench` the defined format for recording all Go benchmark data.
Having a defined ... | proposal/design/14313-benchmark-format.md/0 | {
"file_path": "proposal/design/14313-benchmark-format.md",
"repo_id": "proposal",
"token_count": 6436
} | 662 |
# Generalized Types
This is a proposal for adding generics to Go, written by Ian Lance
Taylor in March, 2011.
This proposal will not be adopted.
It is being presented as an example for what a complete generics
proposal must cover.
## Introduction
This document describes a possible implementation of generalized type... | proposal/design/15292/2011-03-gen.md/0 | {
"file_path": "proposal/design/15292/2011-03-gen.md",
"repo_id": "proposal",
"token_count": 6633
} | 663 |
# Proposal: XML Stream
Author(s): Sam Whited <sam@samwhited.com>
Last updated: 2017-03-09
Discussion at https://golang.org/issue/19480
## Abstract
The `encoding/xml` package contains an API for tokenizing an XML stream, but no
API exists for processing or manipulating the resulting token stream.
This proposal des... | proposal/design/19480-xml-stream.md/0 | {
"file_path": "proposal/design/19480-xml-stream.md",
"repo_id": "proposal",
"token_count": 1524
} | 664 |
# Proposal: Raw XML Token
Author(s): Sam Whited <sam@samwhited.com>
Last updated: 2018-09-01
Discussion at https://golang.org/issue/26756
CL at https://golang.org/cl/127435
## Abstract
This proposal defines a mechanism by which users can emulate the `,innerxml`
struct tag using XML tokens.
## Background
When ... | proposal/design/26756-rawxml-token.md/0 | {
"file_path": "proposal/design/26756-rawxml-token.md",
"repo_id": "proposal",
"token_count": 835
} | 665 |
# Go 1.2 Field Selectors and Nil Checks
Author: Russ Cox
Last updated: July 2013
Discussion at https://go.dev/issue/4238.
Originally at https://go.dev/s/go12nil.
Implemented in Go 1.2 release.
## Abstract
For Go 1.2, we need to define that, if `x` is a pointer to a struct
type and `x == nil`, `&x.Field` causes a... | proposal/design/4238-go12nil.md/0 | {
"file_path": "proposal/design/4238-go12nil.md",
"repo_id": "proposal",
"token_count": 1698
} | 666 |
# User-configurable memory target
Author: Michael Knyszek
Updated: 16 February 2021
## Background
Issue [#23044](https://golang.org/issue/23044) proposed the addition of some
kind of API to provide a "minimum heap" size; that is, the minimum heap goal
that the GC would ever set.
The purpose of a minimum heap size, ... | proposal/design/44309-user-configurable-memory-target.md/0 | {
"file_path": "proposal/design/44309-user-configurable-memory-target.md",
"repo_id": "proposal",
"token_count": 5442
} | 667 |
# Proposal: Extended backwards compatibility for Go
Russ Cox \
December 2022
Earlier discussion at https://go.dev/issue/55090.
Proposal at https://go.dev/issue/56986.
## Abstract
Go's emphasis on backwards compatibility is one of its key strengths.
There are, however, times when we cannot maintain strict compatibi... | proposal/design/56986-godebug.md/0 | {
"file_path": "proposal/design/56986-godebug.md",
"repo_id": "proposal",
"token_count": 4440
} | 668 |
# Design Draft: Go Vulnerability Database
Authors: Roland Shoemaker, Filippo Valsorda
[golang.org/design/draft-vulndb](https://golang.org/design/draft-vulndb)
This is a Draft Design, not a formal Go proposal, since it is a
large change that is still flexible.
The goal of circulating this draft design is to collect f... | proposal/design/draft-vulndb.md/0 | {
"file_path": "proposal/design/draft-vulndb.md",
"repo_id": "proposal",
"token_count": 1276
} | 669 |
# Generics — Problem Overview
Russ Cox\
August 27, 2018
## Introduction
This overview and the accompanying
[detailed draft design](go2draft-contracts.md)
are part of a collection of [Go 2 draft design documents](go2draft.md).
The overall goal of the Go 2 effort is to address
the most significant ways that Go fails t... | proposal/design/go2draft-generics-overview.md/0 | {
"file_path": "proposal/design/go2draft-generics-overview.md",
"repo_id": "proposal",
"token_count": 12666
} | 670 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: jsonpb_proto/test2.proto
package jsonpb_proto
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
anypb "google.golang.org/protobuf/types/known/anypb"
durationpb "google.golang.org/protobuf/types/known/durationpb"
structpb "google.golang.org/pro... | protobuf/internal/testprotos/jsonpb_proto/test2.pb.go/0 | {
"file_path": "protobuf/internal/testprotos/jsonpb_proto/test2.pb.go",
"repo_id": "protobuf",
"token_count": 22263
} | 671 |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package proto
import (
"google.golang.org/protobuf/reflect/protoreflect"
)
// DiscardUnknown recursively discards all unknown fields from this message
// and... | protobuf/proto/discard.go/0 | {
"file_path": "protobuf/proto/discard.go",
"repo_id": "protobuf",
"token_count": 578
} | 672 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto
package descriptor
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
descriptorpb "google.golang.org/protob... | protobuf/protoc-gen-go/descriptor/descriptor.pb.go/0 | {
"file_path": "protobuf/protoc-gen-go/descriptor/descriptor.pb.go",
"repo_id": "protobuf",
"token_count": 6358
} | 673 |
// Copyright 2016 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package ptypes
import (
"errors"
"fmt"
"time"
timestamppb "github.com/golang/protobuf/ptypes/timestamp"
)
// Range of google.protobuf.Duration as specifi... | protobuf/ptypes/timestamp.go/0 | {
"file_path": "protobuf/ptypes/timestamp.go",
"repo_id": "protobuf",
"token_count": 1225
} | 674 |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// cookieauth uses a “Netscape cookie file” to implement the GOAUTH protocol
// described in https://golang.org/issue/26232.
// It expects the location of the f... | tools/cmd/auth/cookieauth/cookieauth.go/0 | {
"file_path": "tools/cmd/auth/cookieauth/cookieauth.go",
"repo_id": "tools",
"token_count": 1539
} | 675 |
// The package doc comment
package initial
import (
"fmt"
"domain.name/importdecl"
)
type t int // type1
// const1
const c = 1 // const2
func foo() {
fmt.Println(importdecl.F())
}
// zinit
const (
z1 = iota // z1
z2 // z2
) // zend
| tools/cmd/bundle/testdata/src/initial/b.go/0 | {
"file_path": "tools/cmd/bundle/testdata/src/initial/b.go",
"repo_id": "tools",
"token_count": 110
} | 676 |
# Test of line-oriented output.
deadcode `-f={{range .Funcs}}{{printf "%s: %s.%s\n" .Position $.Path .Name}}{{end}}` -filter= example.com
want "main.go:13:10: example.com.T.Goodbye"
!want "example.com.T.Hello"
want "main.go:15:6: example.com.unreferenced"
want "fmt.Scanf"
want "fmt.Printf"
!want "fmt.Println"
... | tools/cmd/deadcode/testdata/lineflag.txtar/0 | {
"file_path": "tools/cmd/deadcode/testdata/lineflag.txtar",
"repo_id": "tools",
"token_count": 233
} | 677 |
package one // import "new.com/one"
| tools/cmd/fiximports/testdata/src/old.com/one/one.go/0 | {
"file_path": "tools/cmd/fiximports/testdata/src/old.com/one/one.go",
"repo_id": "tools",
"token_count": 12
} | 678 |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
)
func findGOROOT() string {
if env := os.Getenv("GOROOT"); env != "" {
retur... | tools/cmd/godoc/goroot.go/0 | {
"file_path": "tools/cmd/godoc/goroot.go",
"repo_id": "tools",
"token_count": 245
} | 679 |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
Goyacc is a version of yacc for Go.
It is written in Go and generates parsers written in Go.
Usage:
goyacc args...
It is largely transliterated from the ... | tools/cmd/goyacc/doc.go/0 | {
"file_path": "tools/cmd/goyacc/doc.go",
"repo_id": "tools",
"token_count": 672
} | 680 |
p {
margin: 10px;
}
#presenter-slides {
display: block;
margin-top: -10px;
margin-left: -17px;
position: fixed;
border: 0;
width: 146%;
height: 750px;
transform: scale(0.7, 0.7);
transform-origin: top left;
-moz-transform: scale(0.7);
-moz-transform-origin: top left;
-o-transform: scale(0.7)... | tools/cmd/present/static/notes.css/0 | {
"file_path": "tools/cmd/present/static/notes.css",
"repo_id": "tools",
"token_count": 244
} | 681 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Stringer is a tool to automate the creation of methods that satisfy the fmt.Stringer
// interface. Given the name of a (signed or unsigned) integer type T th... | tools/cmd/stringer/stringer.go/0 | {
"file_path": "tools/cmd/stringer/stringer.go",
"repo_id": "tools",
"token_count": 7605
} | 682 |
#!/bin/bash
# Usage: buildall [-e] [-nocmp] [-work]
#
# Builds everything (std) for every GOOS/GOARCH combination but installs nothing.
#
# By default, runs the builds with -toolexec 'toolstash -cmp', to test that the
# toolchain is producing bit identical output to a previous known good toolchain.
#
# Options:
# -e: ... | tools/cmd/toolstash/buildall/0 | {
"file_path": "tools/cmd/toolstash/buildall",
"repo_id": "tools",
"token_count": 605
} | 683 |
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package analysis
import "go/token"
// A Diagnostic is a message associated with a source location or range.
//
// An Analyzer may return a variety of diagnost... | tools/go/analysis/diagnostic.go/0 | {
"file_path": "tools/go/analysis/diagnostic.go",
"repo_id": "tools",
"token_count": 800
} | 684 |
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains tests for the cgo checker.
package a
// void f(void *ptr) {}
import "C"
import "unsafe"
func CgoTest[T any]() {
var c chan bool
C.f(... | tools/go/analysis/passes/cgocall/testdata/src/typeparams/typeparams.go/0 | {
"file_path": "tools/go/analysis/passes/cgocall/testdata/src/typeparams/typeparams.go",
"repo_id": "tools",
"token_count": 388
} | 685 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains tests for the copylock checker's
// range statement analysis.
package a
import "sync"
func rangeMutex() {
var mu sync.Mutex
var i int... | tools/go/analysis/passes/copylock/testdata/src/a/copylock_range.go/0 | {
"file_path": "tools/go/analysis/passes/copylock/testdata/src/a/copylock_range.go",
"repo_id": "tools",
"token_count": 589
} | 686 |
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package fieldalignment_test
import (
"testing"
"golang.org/x/tools/go/analysis/analysistest"
"golang.org/x/tools/go/analysis/passes/fieldalignment"
)
func... | tools/go/analysis/passes/fieldalignment/fieldalignment_test.go/0 | {
"file_path": "tools/go/analysis/passes/fieldalignment/fieldalignment_test.go",
"repo_id": "tools",
"token_count": 161
} | 687 |
// Copyright 2020 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains tests for the ifaceassert checker.
package a
import "io"
func InterfaceAssertionTest() {
var (
a io.ReadWriteSeeker
b interface {
... | tools/go/analysis/passes/ifaceassert/testdata/src/a/a.go/0 | {
"file_path": "tools/go/analysis/passes/ifaceassert/testdata/src/a/a.go",
"repo_id": "tools",
"token_count": 472
} | 688 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package lostcancel defines an Analyzer that checks for failure to
// call a context cancellation function.
//
// # Analyzer lostcancel
//
// lostcancel: chec... | tools/go/analysis/passes/lostcancel/doc.go/0 | {
"file_path": "tools/go/analysis/passes/lostcancel/doc.go",
"repo_id": "tools",
"token_count": 153
} | 689 |
package b
func f() {
var s []int
t := (*[0]int)(s)
_ = *t // want "nil dereference in load"
_ = (*[0]int)(s)
_ = *(*[0]int)(s) // want "nil dereference in load"
// these operation is panic
_ = (*[1]int)(s) // want "nil slice being cast to an array of len > 0 will always panic"
_ = *(*[1]int)(s) // want "nil ... | tools/go/analysis/passes/nilness/testdata/src/b/b.go/0 | {
"file_path": "tools/go/analysis/passes/nilness/testdata/src/b/b.go",
"repo_id": "tools",
"token_count": 354
} | 690 |
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package structtag defines an Analyzer that checks struct field tags
// are well formed.
package structtag
import (
"errors"
"go/ast"
"go/token"
"go/type... | tools/go/analysis/passes/structtag/structtag.go/0 | {
"file_path": "tools/go/analysis/passes/structtag/structtag.go",
"repo_id": "tools",
"token_count": 3324
} | 691 |
package b
type Foo struct {
}
func (f *Foo) F() {
}
| tools/go/analysis/passes/tests/testdata/src/b/b.go/0 | {
"file_path": "tools/go/analysis/passes/tests/testdata/src/b/b.go",
"repo_id": "tools",
"token_count": 26
} | 692 |
// Copyright 2018 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// This file contains tests for the unmarshal checker.
package testdata
import (
"encoding/asn1"
"encoding/gob"
"encoding/json"
"encoding/xml"
"io"
)
fu... | tools/go/analysis/passes/unmarshal/testdata/src/a/a.go/0 | {
"file_path": "tools/go/analysis/passes/unmarshal/testdata/src/a/a.go",
"repo_id": "tools",
"token_count": 999
} | 693 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package unusedresult defines an analyzer that checks for unused
// results of calls to certain pure functions.
//
// # Analyzer unusedresult
//
// unusedresu... | tools/go/analysis/passes/unusedresult/doc.go/0 | {
"file_path": "tools/go/analysis/passes/unusedresult/doc.go",
"repo_id": "tools",
"token_count": 186
} | 694 |
// Copyright 2021 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package usesgenerics
import (
_ "embed"
"reflect"
"golang.org/x/tools/go/analysis"
"golang.org/x/tools/go/analysis/passes/inspect"
"golang.org/x/tools/go... | tools/go/analysis/passes/usesgenerics/usesgenerics.go/0 | {
"file_path": "tools/go/analysis/passes/usesgenerics/usesgenerics.go",
"repo_id": "tools",
"token_count": 806
} | 695 |
// Copyright 2017 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package astutil_test
import (
"bytes"
"go/ast"
"go/format"
"go/parser"
"go/token"
"testing"
"golang.org/x/tools/go/ast/astutil"
)
type rewriteTest str... | tools/go/ast/astutil/rewrite_test.go/0 | {
"file_path": "tools/go/ast/astutil/rewrite_test.go",
"repo_id": "tools",
"token_count": 2426
} | 696 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package callgraph_test
import (
"log"
"sync"
"testing"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/callgraph/cha"
"golang.org/x/tools/go/cal... | tools/go/callgraph/callgraph_test.go/0 | {
"file_path": "tools/go/callgraph/callgraph_test.go",
"repo_id": "tools",
"token_count": 2707
} | 697 |
// Copyright 2014 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package static_test
import (
"fmt"
"go/parser"
"reflect"
"sort"
"testing"
"golang.org/x/tools/go/callgraph"
"golang.org/x/tools/go/callgraph/static"
"... | tools/go/callgraph/static/static_test.go/0 | {
"file_path": "tools/go/callgraph/static/static_test.go",
"repo_id": "tools",
"token_count": 1007
} | 698 |
// Copyright 2023 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// go:build ignore
package testdata
type I interface {
Name() string
Foo()
}
var is = make(map[string]I)
func init() {
register(A{})
register(B{})
}
fu... | tools/go/callgraph/vta/testdata/src/callgraph_comma_maps.go/0 | {
"file_path": "tools/go/callgraph/vta/testdata/src/callgraph_comma_maps.go",
"repo_id": "tools",
"token_count": 620
} | 699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.