id
int64
1
100k
stripped_content
stringlengths
1.97k
1.04M
original_content
stringlengths
1.97k
1.05M
tokenized
list
tokenized_section
list
72,757
package raw import ( "bytes" "net" "testing" "time" "unsafe" "github.com/google/go-cmp/cmp" "golang.org/x/net/bpf" "golang.org/x/sys/unix" ) type bindSocket struct { bind unix.Sockaddr noopSocket } func (s *bindSocket) Bind(sa unix.Sockaddr) error { s.bind = sa return nil } func Test_newPacketConnBind(...
// +build linux package raw import ( "bytes" "net" "testing" "time" "unsafe" "github.com/google/go-cmp/cmp" "golang.org/x/net/bpf" "golang.org/x/sys/unix" ) // Test to ensure that socket is bound with correct sockaddr_ll information type bindSocket struct { bind unix.Sockaddr noopSocket } func (s *bindS...
[ 5786, 4971, 188, 188, 4747, 280, 188, 187, 4, 2186, 4, 188, 187, 4, 1291, 4, 188, 187, 4, 4342, 4, 188, 187, 4, 1149, 4, 188, 187, 4, 3331, 4, 188, 188, 187, 4, 3140, 16, 817, 17, 2735, 17, 2035, 15, 3109, 17, 3109, 4, 188...
[ 5604, 28, 690, 88, 347, 3793, 14, 5604, 11, 188, 187, 95, 188, 95, 188, 188, 1857, 2214, 65, 3408, 5716, 37184, 2918, 9235, 10, 86, 258, 4342, 16, 54, 11, 275, 188, 187, 2256, 497, 721, 7105, 3408, 5716, 25449, 37184, 10, 3974, ...
72,758
package testing import ( "fmt" "net/http" "testing" fake "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/common" "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/extensions/portsecurity" "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/networ...
package testing import ( "fmt" "net/http" "testing" fake "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/common" "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/extensions/portsecurity" "github.com/opentelekomcloud/gophertelekomcloud/openstack/networking/v2/networ...
[ 5786, 8927, 188, 188, 4747, 280, 188, 187, 4, 2763, 4, 188, 187, 4, 1291, 17, 1635, 4, 188, 187, 4, 4342, 4, 188, 188, 187, 9232, 312, 3140, 16, 817, 17, 443, 316, 18742, 77, 476, 6101, 17, 42397, 20208, 77, 476, 6101, 17, 214...
[ 54, 11, 275, 188, 187, 351, 16, 7798, 5918, 336, 188, 187, 5303, 382, 16, 2388, 18595, 5918, 336, 188, 188, 187, 351, 16, 20935, 16, 2432, 3399, 6710, 88, 20, 16, 18, 17, 36266, 347, 830, 10, 89, 1540, 16, 24036, 14, 470, 258, ...
72,759
package v2 import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import envoy_api_v2_core "github.com/cilium/cilium/pkg/envoy/envoy/api/v2/core" import envoy_api_v2_endpoint "github.com/cilium/cilium/pkg/envoy/envoy/api/v2/endpoint" import google_protobuf3 "github.com/golang/protobuf/ptyp...
// Code generated by protoc-gen-go. DO NOT EDIT. // source: envoy/service/load_stats/v2/lrs.proto /* Package v2 is a generated protocol buffer package. It is generated from these files: envoy/service/load_stats/v2/lrs.proto It has these top-level messages: LoadStatsRequest LoadStatsResponse */ package v2 import ...
[ 5786, 325, 20, 188, 188, 4747, 1853, 312, 3140, 16, 817, 17, 9161, 17, 3607, 17, 1633, 4, 188, 4747, 2764, 312, 2763, 4, 188, 4747, 8703, 312, 4964, 4, 188, 4747, 47084, 65, 1791, 65, 88, 20, 65, 1576, 312, 3140, 16, 817, 17, ...
[ 1700, 65, 1773, 3645, 5807, 1784, 14, 790, 11, 188, 95, 188, 188, 558, 3248, 34858, 23916, 603, 275, 188, 187, 685, 258, 7989, 16, 29442, 188, 95, 188, 188, 1857, 3409, 3645, 34858, 23916, 10, 685, 258, 7989, 16, 29442, 11, 6346, ...
72,761
package otbuiltin import ( "bytes" "errors" "strconv" "strings" "time" "unsafe" glib "github.com/ostreedev/ostree-go/pkg/glibobject" ) import "C" var pruneOpts pruneOptions type pruneOptions struct { NoPrune bool RefsOnly bool DeleteCommit string KeepYoungerThan tim...
package otbuiltin import ( "bytes" "errors" "strconv" "strings" "time" "unsafe" glib "github.com/ostreedev/ostree-go/pkg/glibobject" ) // #cgo pkg-config: ostree-1 // #include <stdlib.h> // #include <glib.h> // #include <ostree.h> // #include "builtin.go.h" import "C" // Declare gobal variable for options va...
[ 5786, 21229, 7045, 188, 188, 4747, 280, 188, 187, 4, 2186, 4, 188, 187, 4, 4383, 4, 188, 187, 4, 20238, 4, 188, 187, 4, 6137, 4, 188, 187, 4, 1149, 4, 188, 187, 4, 3331, 4, 188, 188, 187, 33721, 312, 3140, 16, 817, 17, 761, ...
[ 11071, 209, 209, 209, 209, 209, 209, 209, 209, 209, 1019, 209, 209, 209, 209, 209, 263, 187, 20286, 4332, 209, 209, 209, 209, 209, 209, 209, 209, 1019, 209, 209, 209, 209, 209, 263, 187, 3593, 9807, 209, 209, 209, 209, 776, 209, ...
72,762
package taskrun_test import ( "context" "strings" "testing" "fmt" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/knative/build-pipeline/pkg/apis/pipeline/v1alpha1" "github.com/knative/build-pipeline/pkg/reconciler/v1alpha1/taskrun" "github.com/knative/build-pipeline/pkg/re...
/* Copyright 2018 The Knative Authors 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 writing, softwar...
[ 5786, 3339, 2650, 65, 1028, 188, 188, 4747, 280, 188, 187, 4, 1609, 4, 188, 187, 4, 6137, 4, 188, 187, 4, 4342, 4, 188, 188, 187, 4, 2763, 4, 188, 188, 187, 4, 3140, 16, 817, 17, 2735, 17, 2035, 15, 3109, 17, 3109, 4, 188, ...
[ 4478, 47745, 28, 1397, 23410, 19, 16, 4478, 11968, 93, 7138, 11968, 519, 188, 1263, 187, 519, 188, 1263, 187, 93, 188, 5520, 187, 613, 28, 209, 209, 209, 312, 2737, 2994, 4222, 347, 188, 5520, 187, 2395, 28, 209, 209, 312, 2737, 2...
72,767
package mwitkow_testproto import proto "github.com/golang/protobuf/proto" import fmt "fmt" import math "math" import ( context "context" grpc "google.golang.org/grpc" ) var _ = proto.Marshal var _ = fmt.Errorf var _ = math.Inf const _ = proto.ProtoPackageIsVersion2 type Empty struct { } func (m *Empty) Reset()...
// Code generated by protoc-gen-go. // source: test.proto // DO NOT EDIT! /* Package mwitkow_testproto is a generated protocol buffer package. It is generated from these files: test.proto It has these top-level messages: Empty PingRequest PingResponse */ package mwitkow_testproto import proto "github.com/golang...
[ 5786, 36349, 42655, 500, 65, 1028, 1633, 188, 188, 4747, 1853, 312, 3140, 16, 817, 17, 9161, 17, 3607, 17, 1633, 4, 188, 4747, 2764, 312, 2763, 4, 188, 4747, 8703, 312, 4964, 4, 188, 188, 4747, 280, 188, 187, 1609, 312, 1609, 4, ...
[ 347, 188, 187, 95, 188, 187, 3132, 721, 830, 10, 1167, 1701, 16, 1199, 14, 3524, 2251, 5494, 280, 3314, 4364, 790, 11, 275, 188, 187, 187, 397, 18873, 7402, 1140, 1700, 2827, 717, 21669, 10, 1167, 14, 3524, 9004, 21669, 1222, 452, ...
72,770
package main import ( "bufio" "context" "fmt" "io/ioutil" "os" "os/exec" "strconv" "strings" "sync" "github.com/rs/xid" yaml "gopkg.in/yaml.v2" "github.com/spf13/cobra" "github.com/spf13/viper" "github.com/alittlebrighter/coach" models "github.com/alittlebrighter/coach/gen/proto" "github.com/alittle...
// Copyright (c) 2018, Adam Bright <brightam1@gmail.com> // See LICENSE for licensing information package main import ( "bufio" "context" "fmt" "io/ioutil" "os" "os/exec" "strconv" "strings" "sync" "github.com/rs/xid" yaml "gopkg.in/yaml.v2" "github.com/spf13/cobra" "github.com/spf13/viper" "github.c...
[ 5786, 3635, 188, 188, 4747, 280, 188, 187, 4, 32809, 4, 188, 187, 4, 1609, 4, 188, 187, 4, 2763, 4, 188, 187, 4, 626, 17, 28125, 4, 188, 187, 4, 549, 4, 188, 187, 4, 549, 17, 5186, 4, 188, 187, 4, 20238, 4, 188, 187, 4, ...
[ 869, 275, 188, 2054, 187, 1043, 260, 1639, 188, 350, 187, 95, 188, 187, 187, 95, 188, 188, 187, 187, 5505, 14, 497, 721, 2988, 961, 16, 901, 25310, 8734, 10, 1043, 14, 1408, 14, 3276, 11, 188, 187, 187, 285, 497, 598, 869, 275, ...
72,772
package quotasfakes import ( "sync" "code.cloudfoundry.org/cli/cf/api/quotas" "code.cloudfoundry.org/cli/cf/models" ) type FakeQuotaRepository struct { FindAllStub func() (quotas []models.QuotaFields, apiErr error) findAllMutex sync.RWMutex findAllArgsForCall []struct{} findAllReturns struct ...
// This file was generated by counterfeiter package quotasfakes import ( "sync" "code.cloudfoundry.org/cli/cf/api/quotas" "code.cloudfoundry.org/cli/cf/models" ) type FakeQuotaRepository struct { FindAllStub func() (quotas []models.QuotaFields, apiErr error) findAllMutex sync.RWMutex findAllArgsFo...
[ 5786, 13103, 38270, 5389, 188, 188, 4747, 280, 188, 187, 4, 2044, 4, 188, 188, 187, 4, 713, 16, 6101, 488, 293, 21840, 16, 1587, 17, 8912, 17, 1737, 17, 1791, 17, 8127, 332, 4, 188, 187, 4, 713, 16, 6101, 488, 293, 21840, 16, ...
[ 1397, 6561, 16, 14614, 3778, 14, 6538, 724, 790, 11, 188, 187, 45902, 8751, 209, 209, 209, 209, 209, 209, 6202, 16, 40285, 188, 187, 45902, 44051, 1397, 393, 2475, 188, 187, 45902, 10072, 209, 209, 209, 209, 603, 275, 188, 187, 187,...
72,777
package topology import ( "bytes" "context" "crypto/sha256" "encoding/hex" "encoding/json" "errors" "fmt" "log" "math" "net/http" "net/url" "regexp" "sort" "strconv" "strings" "time" "github.com/olivere/elastic" "github.com/recallsong/go-utils/conv" "github.com/erda-project/erda-infra/providers/ht...
// Copyright (c) 2021 Terminus, 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 agree...
[ 5786, 23133, 188, 188, 4747, 280, 188, 187, 4, 2186, 4, 188, 187, 4, 1609, 4, 188, 187, 4, 6253, 17, 7350, 2337, 4, 188, 187, 4, 6534, 17, 7690, 4, 188, 187, 4, 6534, 17, 1894, 4, 188, 187, 4, 4383, 4, 188, 187, 4, 2763, 4...
[ 65, 689, 788, 3654, 16, 4755, 810, 14, 188, 187, 95, 188, 187, 2828, 14, 497, 721, 23133, 16, 8041, 83, 16, 2066, 435, 48763, 1957, 347, 8780, 14, 3599, 2911, 14, 10810, 2911, 11, 188, 187, 285, 497, 598, 869, 275, 188, 187, 187...
72,779
package arc import ( "context" "fmt" "math" "time" "chromiumos/tast/errors" "chromiumos/tast/local/android/ui" "chromiumos/tast/local/arc" "chromiumos/tast/local/chrome" "chromiumos/tast/local/chrome/ash" "chromiumos/tast/local/chrome/display" chromeui "chromiumos/tast/local/chrome/ui" "chromiumos/tast/lo...
// Copyright 2019 The Chromium OS 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 arc import ( "context" "fmt" "math" "time" "chromiumos/tast/errors" "chromiumos/tast/local/android/ui" "chromiumos/tast/local/arc" "c...
[ 5786, 14627, 188, 188, 4747, 280, 188, 187, 4, 1609, 4, 188, 187, 4, 2763, 4, 188, 187, 4, 4964, 4, 188, 187, 4, 1149, 4, 188, 188, 187, 4, 48080, 549, 17, 86, 682, 17, 4383, 4, 188, 187, 4, 48080, 549, 17, 86, 682, 17, 15...
[ 1592, 17, 5877, 4270, 4, 188, 187, 4, 48080, 549, 17, 86, 682, 17, 4342, 4, 188, 11, 188, 188, 819, 280, 188, 187, 19527, 1140, 19001, 613, 260, 312, 1587, 16, 48080, 16, 10484, 16, 1028, 1041, 16, 19511, 248, 19511, 4, 188, 188...
72,792
package common import ( "context" "fmt" "sync" "time" "github.com/vmware/govmomi/find" "github.com/vmware/govmomi/object" "github.com/vmware/govmomi/property" "github.com/vmware/govmomi/vim25/mo" vim25types "github.com/vmware/govmomi/vim25/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/statu...
/* Copyright 2020 The Kubernetes Authors. 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 writing, ...
[ 5786, 5534, 188, 188, 4747, 280, 188, 187, 4, 1609, 4, 188, 187, 4, 2763, 4, 188, 187, 4, 2044, 4, 188, 187, 4, 1149, 4, 188, 188, 187, 4, 3140, 16, 817, 17, 35847, 17, 2035, 1585, 29047, 17, 2625, 4, 188, 187, 4, 3140, 16, ...
[ 88, 19968, 16, 9405, 321, 4016, 11, 280, 806, 61, 530, 63, 2178, 14, 790, 11, 275, 188, 188, 187, 1151, 721, 6183, 16, 901, 5084, 10, 1167, 11, 188, 187, 379, 721, 13151, 16, 6607, 10, 1167, 11, 188, 187, 285, 497, 598, 869, 2...
72,795
package load import ( "path/filepath" "reflect" "sort" "strconv" "strings" "github.com/mmcloughlin/avo/internal/inst" "github.com/mmcloughlin/avo/internal/opcodescsv" "github.com/mmcloughlin/avo/internal/opcodesxml" ) const ( DefaultCSVName = "x86.v0.2.csv" DefaultOpcodesXMLName = "x86_64.xml" ) ty...
package load import ( "path/filepath" "reflect" "sort" "strconv" "strings" "github.com/mmcloughlin/avo/internal/inst" "github.com/mmcloughlin/avo/internal/opcodescsv" "github.com/mmcloughlin/avo/internal/opcodesxml" ) // Expected data source filenames. const ( DefaultCSVName = "x86.v0.2.csv" Default...
[ 5786, 3248, 188, 188, 4747, 280, 188, 187, 4, 1147, 17, 16117, 4, 188, 187, 4, 5777, 4, 188, 187, 4, 4223, 4, 188, 187, 4, 20238, 4, 188, 187, 4, 6137, 4, 188, 188, 187, 4, 3140, 16, 817, 17, 7330, 309, 3674, 816, 17, 532, ...
[ 187, 95, 188, 188, 350, 187, 529, 2426, 9439, 721, 2068, 386, 16, 6608, 25238, 10, 72, 11, 275, 188, 2054, 187, 285, 3466, 61, 7435, 63, 489, 869, 275, 188, 1263, 187, 480, 61, 7435, 63, 260, 396, 3722, 16, 4417, 93, 188, 5520, ...
72,798
package redis import ( "context" "encoding/json" "errors" gopherapi "github.com/friendsofgo/gopherapi/pkg" "github.com/gomodule/redigo/redis" _ "github.com/lib/pq" "github.com/rafaeljusto/redigomock" "github.com/stretchr/testify/assert" "testing" "time" ) func Test_GopherRepository_CreateGopher_RepositoryEr...
package redis import ( "context" "encoding/json" "errors" gopherapi "github.com/friendsofgo/gopherapi/pkg" "github.com/gomodule/redigo/redis" _ "github.com/lib/pq" "github.com/rafaeljusto/redigomock" "github.com/stretchr/testify/assert" "testing" "time" ) func Test_GopherRepository_CreateGopher_RepositoryEr...
[ 5786, 24718, 188, 188, 4747, 280, 188, 187, 4, 1609, 4, 188, 187, 4, 6534, 17, 1894, 4, 188, 187, 4, 4383, 4, 188, 187, 42397, 1791, 312, 3140, 16, 817, 17, 31404, 2339, 537, 2035, 17, 42397, 1791, 17, 5090, 4, 188, 187, 4, 31...
[ 188, 187, 4, 3140, 16, 817, 17, 39981, 17, 39815, 17, 1545, 4, 188, 187, 4, 4342, 4, 188, 187, 4, 1149, 4, 188, 11, 188, 188, 1857, 2214, 65, 41, 37935, 6475, 65, 2272, 41, 37935, 65, 6475, 914, 10, 86, 258, 4342, 16, 54, 11...
72,805
package functional import ( "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" "github.com/gardener/cert-management/pkg/apis/cert/v1alpha1" "github.com/gardener/cert-management/test/functional/config" "github.com/gardener/controller-manager-library/pkg/resources...
/* * SPDX-FileCopyrightText: 2019 SAP SE or an SAP affiliate company and Gardener contributors * * SPDX-License-Identifier: Apache-2.0 */ package functional import ( "time" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" . "github.com/onsi/gomega/gstruct" "github.com/gardener/cert-management/pkg/a...
[ 5786, 24260, 188, 188, 4747, 280, 188, 187, 4, 1149, 4, 188, 188, 187, 16, 312, 3140, 16, 817, 17, 46908, 17, 49878, 17, 88, 20, 4, 188, 187, 16, 312, 3140, 16, 817, 17, 46908, 17, 73, 26985, 4, 188, 187, 16, 312, 3140, 16, ...
[ 188, 188, 187, 16, 312, 3140, 16, 817, 17, 46908, 17, 49878, 17, 88, 20, 4, 188, 187, 16, 312, 3140, 16, 817, 17, 46908, 17, 73, 26985, 4, 188, 187, 16, 312, 3140, 16, 817, 17, 46908, 17, 73, 26985, 17, 73, 393, 4, 188, 188,...
72,813
package model import ( "github.com/apache/plc4x/plc4go/internal/plc4go/spi/utils" "github.com/apache/plc4x/plc4go/internal/plc4go/spi/values" api "github.com/apache/plc4x/plc4go/pkg/plc4go/values" "github.com/pkg/errors" ) func DataItemParse(readBuffer utils.ReadBuffer, dataType string, numberOfValues uint16) (ap...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you ...
[ 5786, 3097, 188, 188, 4747, 280, 188, 187, 4, 3140, 16, 817, 17, 2476, 17, 586, 69, 22, 90, 17, 586, 69, 22, 2035, 17, 2664, 17, 586, 69, 22, 2035, 17, 3686, 17, 3885, 4, 188, 187, 4, 3140, 16, 817, 17, 2476, 17, 586, 69, ...
[ 559, 10, 19, 1050, 263, 188, 187, 187, 731, 14, 547, 731, 724, 721, 1415, 1698, 16, 1933, 4685, 26, 435, 731, 347, 1013, 11, 188, 187, 187, 285, 547, 731, 724, 598, 869, 275, 188, 350, 187, 397, 869, 14, 3955, 16, 9610, 1706, ...
72,814
package mysql import ( "context" "strconv" "testing" "ariga.io/atlas/sql/internal/sqltest" "ariga.io/atlas/sql/migrate" "ariga.io/atlas/sql/schema" "github.com/DATA-DOG/go-sqlmock" "github.com/stretchr/testify/require" ) func TestMigrate_ApplyChanges(t *testing.T) { migrate, mk, err := newMigrate("8.0.13")...
// Copyright 2021-present The Atlas Authors. All rights reserved. // This source code is licensed under the Apache 2.0 license found // in the LICENSE file in the root directory of this source tree. package mysql import ( "context" "strconv" "testing" "ariga.io/atlas/sql/internal/sqltest" "ariga.io/atlas/sql/mi...
[ 5786, 15041, 188, 188, 4747, 280, 188, 187, 4, 1609, 4, 188, 187, 4, 20238, 4, 188, 187, 4, 4342, 4, 188, 188, 187, 4, 273, 19412, 16, 626, 17, 31575, 17, 4220, 17, 2664, 17, 4220, 1028, 4, 188, 187, 4, 273, 19412, 16, 626, ...
[ 13342, 1083, 20320, 66, 13511, 188, 350, 187, 519, 188, 187, 187, 519, 188, 187, 187, 93, 188, 350, 187, 14492, 28, 1397, 5270, 16, 3760, 93, 188, 2054, 187, 1857, 336, 258, 5270, 16, 1320, 1930, 275, 188, 1263, 187, 86, 721, 396,...