messages listlengths 2 2 | language stringclasses 8
values | prompt_type stringclasses 2
values | lint_errors int64 0 129 ⌀ | cyclomatic_complexity int64 0 32 ⌀ | license stringclasses 7
values | commit stringlengths 40 40 | repos stringlengths 5 116k | new_file stringlengths 4 220 | status stringclasses 6
values | error stringlengths 26 74 ⌀ | is_valid_syntax bool 2
classes |
|---|---|---|---|---|---|---|---|---|---|---|---|
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/codegangsta/negroni\"\n\t\"github.com/hariharan-uno/cors\"\n\t\"github.com/joshsoftware/curem/config\"\n)\n\nfunc main() {\n\n\tc := make(map[string]string)\n\tc[\"name\"] = \"test\"\n\tc[\"url\"] = \"lo... | go | edit | 3 | 1 | mit | 57e28dbc82966b03569338bce11048ad96ed59a2 | joshsoftware/curem,joshsoftware/curem | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ast\n\n// AnonymousFunction represents a anonymous function as an expression.\ntype AnonymousFunction struct {\n\tsignature Signature\n\tbody interface{}\n}\n\n// NewAnonymousFunction creates a anonymous function.\nfunc NewAnonymou... | go | edit | 9 | 1 | mit | 433745d068bf6bceb9c438e4bd0a8d713de5ed77 | raviqqe/tisp,raviqqe/tisp,tisp-lang/tisp,raviqqe/tisp,tisp-lang/tisp | src/lib/ast/anonymous_function.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2015 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.... | go | edit | 0 | 1 | apache-2.0 | 461713884a06cd16c9a7cf494663d21dbda4e559 | kubernetes/apimachinery | pkg/types/namespacedname.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2015 The Vanadium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Command fortuned runs a daemon that implements the Fortune interface.\n... | go | edit | 0 | 2 | bsd-3-clause | 4dc5c4356fdb67198a3eacc6879ffb1d8b29eb85 | vanadium/go.ref,vanadium/go.ref,vanadium/go.ref,vanadium/go.ref,vanadium/go.ref,vanadium/go.ref | examples/fortune/fortuned/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"github.com/teddywing/git-checkout-history/utils\"\n\t\"os\"\n\t\"os/exec\"\n)\n\nfunc main() {\n\targs := os.Args[1:]\n\t\n\tif len(args) > 0 {\n\t\tutils.Store(args[0])\n\t\t\n\t\tcmd := ex... | go | edit | 0 | 3 | mit | ea03b4335528cf741b29df1403680f11e56722b1 | teddywing/git-checkout-history | git-checkout-store/main.go | rejected_duplicate | Near-duplicate of sample 117061 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage common\n\nimport (\n\t\"encoding/json\"\n\t\"math\"\n)\n\n// PlotValue represents a graph plot value.\ntype PlotValue float64\n\n// MarshalJSON handles JSON marshaling of the PlotValue type.\nfunc (value PlotValue) MarshalJSON() ([]byte... | go | edit | 0 | 3 | bsd-3-clause | b7bd1b9fd48c3a9acdd8bb5d83027dbcb557020c | facette/facette,hirocaster/facette,githubert/facette,Skrupellos/facette,iaean/facette,Skrupellos/facette,facette/facette,vovkasm/facette,psytra/facette,vovkasm/facette,yonglehou/facette,vovkasm/facette,githubert/facette,Skrupellos/facette,yonglehou/facette,psytra/facette,githubert/facette,yonglehou/facette,hirocaster/f... | src/facette/common/types.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage schedule\n\ntype ScheduleEntries int\n\ntype CommitSchedule [][]int\n\nconst (\n\tNOT_A_FIELD ScheduleEntries = -1\n\tEMPTY ScheduleEntries = 0\n\tONE ScheduleEntries = 1\n\tTWO ScheduleEntries = 2\n\tTHREE S... | go | edit | 0 | 2 | mit | 4d9393ae0de684f654ea0eb61e9712317b0dde3a | 0xfoo/punchcard | schedule/commit_schedule.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage twweather\n\nimport \"testing\"\n\nfunc TestGetTemperture(t *testing.T) {\n\tweather.UpdateStationStatusWithData(sampleXML)\n\tstation := weather.GetStation(\"橫山\")\n\n\ttemperture, err := station.GetTemperture(true)\n\n\tif err != nil ... | go | edit | 9 | 3 | mit | 11f71f3a09086902ccda83f0d354133585789c6f | MinecraftXwinP/twweather | stationStatus_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright (c) 2015, Peter Mrekaj. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE.txt file.\n\npackage recursion\n\n// PowerSet returns a power set of s.\n// The length... | go | edit | 3 | 5 | mit | 5f65c84b1cf8d35f3f23bbc0a7e5a8dcc056cd38 | mrekucci/epi,mrekucci/epi | recursion/powerset.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage jiradata\n\nimport (\n\t\"strings\"\n)\n\n// Find will search the transitions for one that matches\n// the given name. It will return a valid trantion that matches\n// or nil\nfunc (t Transitions) Find(name string) *Transition {\n\tnam... | go | edit | 0 | 5 | apache-2.0 | a70384b03bfb37279088839213cfed11f6487bab | go-jira/jira,Netflix-Skunkworks/go-jira,Netflix-Skunkworks/go-jira,Netflix-Skunkworks/go-jira,go-jira/jira | jiradata/TransitionsFuncs.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage lager\n\nimport (\n\t\"io\"\n\t\"sync\"\n)\n\nconst logBufferSize = 1024\n\n// A Sink represents a write destination for a Logger. It provides\n// a thread-safe interface for writing logs\ntype Sink interface {\n\t//Log to the sink. Be... | go | edit | 9 | 2 | apache-2.0 | 9ac350c1e5f6e5a8eb55a802f1ec4a13897d2eff | pivotal-golang/lager,tinygrasshopper/lager | writer_sink.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage uct\n\nimport \"flag\"\n\n//This is the QML compiler for uct.\nvar Qml bool\n\nvar QmlAssembly = Assemblable{}\n\nfunc init() {\n\tflag.BoolVar(&Qml, \"qml\", false, \"Target QML\")\n\t\n\tfor k, v := range JavascriptAssembly {\n\t\tQml... | go | edit | 9 | 2 | bsd-3-clause | 6e1444ccb4cfa0dca30b8ad9990815d8686741ba | Qlova/uct | src/qml.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strconv\"\n)\n\nfunc main() {\n\tfor i := 1; i <= 100; i++ {\n\t\tvar output string\n\t\tswitch {\n\t\tcase i%15 == 0:\n\t\t\toutput = \"fizzbuzz\"\n\t\tcase i%3 == 0:\n\t\t\toutput = \"fizz\"\n\t\tcase ... | go | edit | 0 | 5 | mit | ddddd409aebd2d50c1ce6fe76531fe83b8c949f4 | qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin,qjcg/CO2Aldrin | src/fizzbuzz.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage crawler\n\n// TODO: Implement\nfunc (p *Prospector) isFileRenamed(file string, info os.FileInfo, missingfiles map[string]os.FileInfo) string {\n\t// Can we detect if a file was renamed on Windows?\n\t// NOTE(driskell): What about using ... | go | edit | 6 | 1 | mit | c7774a27cb496f8b31fcfd58f582d15f56897e3e | yapdns/yapdnsbeat,yapdns/yapdnsbeat | crawler/prospector_windows.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ssha_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/jsimonetti/pwscheme/ssha\"\n)\n\nfunc TestValidate(t *testing.T) {\n\tpass := \"test123\"\n\thash := \"{SSHA}lJj507aRaXGguk1uTQoKmKQRV/7N1oB7pmhWdw==\"\n\n\tif res, err := ssha.Vali... | go | edit | 0 | 2 | mit | 91a6f5cd0820f571cf60315230c3bc7a518f9fb8 | jsimonetti/pwscheme | ssha/ssha_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cheerio\n\nimport (\n\t\"testing\"\n)\n\nfunc TestFetchSourceRepoURI(t *testing.T) {\n\ttests := []struct {\n\t\tpkg string\n\t\twantRepoURI string\n\t}{\n\t\t{\"flask_cm\", \"https://github.com/futuregrid/flask_cm\"},\n\t}\n\n\... | go | edit | 0 | 4 | apache-2.0 | 6f27d1e6cb75bee7d130e0bc21ec23bcdd2f2c9d | beyang/cheerio | repo_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage vcr_test\n\nimport (\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"github.com/dnaeon/go-vcr/recorder\"\n)\n\nfunc TestSimple(t *testing.T) {\n\t// Start our recorder\n\tr, err := recorder.New(\"fixtures/golang-or... | go | edit | 0 | 5 | bsd-2-clause | e2e1ab814c27496d1847ab8c0dad3a06f149ffbc | davars/go-vcr | example/simple_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.... | go | edit | 0 | 0 | apache-2.0 | d31e4cb261b8b38a51c8f536829e843002868a70 | cmluciano/dns,kubernetes/dns,corlettb/dns,bowei/dns,kubernetes/dns,bowei/dns,corlettb/dns,cmluciano/dns,kubernetes/dns | pkg/dns/doc.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage shade\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\ntype File struct {\n\tFilename string\n\tFilesize int64\n\tModifiedTime time.Time\n\tChunksize int\n\tChunks []Chunk\n\tAesKey []byte\n}\n\ntype Chunk struct {\n\tInd... | go | edit | 0 | 4 | apache-2.0 | c0350dcecd6bb9c85f3b87b2e92a2fc3ab81eea0 | asjoyner/shade,asjoyner/shade | file.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage gtf\n\nimport (\n\t\"testing\"\n\t\"bytes\"\n\t\"html/template\"\n)\n\nfunc AssertEqual(t *testing.T, buffer *bytes.Buffer, testString string) {\n\tif buffer.String() != testString {\n\t\tt.Error()\n\t}\n\tbuffer.Reset()\n}\n\nfunc Pars... | go | edit | 3 | 2 | mit | 69ec64793b7a9e321ce46ba83aed1403eee9c415 | RichardKnop/gtf,leekchan/gtf,Parkayun/gtf | gtf_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"flag\"\n\t\"github.com/zenazn/goji\"\n\t\"github.com/zenazn/goji/web/middleware\"\n\t\"net/http\"\n)\n\nvar (\n\tdefaults *config\n\t//decoder = schema.NewDecoder()\n)\n\nfunc start(conf *config) {\n\tdefaults =... | go | edit | 21 | 2 | mit | 0e93f1795a8a479ce4ac381d103727b55f68b1e4 | LapisBlue/Lapitar,LapisBlue/Lapitar,LapisBlue/Lapitar | server/http.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage backend\n\nimport (\n\t\"context\"\n\n\t\"github.com/docker/ecs-plugin/pkg/amazon/types\"\n\t\"github.com/docker/ecs-plugin/pkg/compose\"\n)\n\nfunc (b *Backend) Down(ctx context.Context, options compose.ProjectOptions) error {\n\tproje... | go | edit | 3 | 5 | apache-2.0 | dcf84f24998a756a1bd6a4b2930b8da76f314d77 | docker/compose,docker/compose,docker/compose | ecs/pkg/amazon/backend/down.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage db\n\nimport (\n\t\"firempq/db/cldb\"\n\t\"firempq/log\"\n\t\"os\"\n\t\"sync\"\n\n\t. \"firempq/api\"\n)\n\nvar database DataStorage = nil\nvar lock sync.Mutex\n\n// GetDatabase returns DataStorage singleton.\nfunc GetDatabase() DataSto... | go | edit | 9 | 5 | apache-2.0 | 8b354e8af807303532112946d5a7913fe73801d4 | vburenin/firempq | db/dbfactory.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tRedirectHandlerRedirectCountMetric = prometheus.NewCounterVec(\n\t\tprometheus.CounterOpts{\n\t\t\tName: \"router_redirect_handler_redirect_count\... | go | edit | 0 | 1 | mit | 32e5de053a6177f18824a3a99fcfa2e6b8094e12 | alphagov/router | handlers/metrics.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage bigsequence\n\nimport (\n\t\"testing\"\n\t\"github.com/johnny-morrice/godelbrot/base\"\n\t\"github.com/johnny-morrice/godelbrot/bigbase\"\n)\n\nfunc TestBigMandelbrotSequence(t *testing.T) {\n\tconst prec = 53\n\tconst iterLimit = 10\n\... | go | edit | 0 | 2 | mit | f845bcd561d3fdb9f7f7b8e6424454e93785b106 | johnny-morrice/godelbrot | bigsequence/bigsequentialrender_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2016 Google Inc. All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n/... | go | edit | 0 | 0 | apache-2.0 | 6b96f28e0bae088468b759e5508bc6d1fce16564 | google/badwolf | bql/version/version.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2014 Marc-Antoine Ruel. All rights reserved.\n// Use of this source code is governed under the Apache License, Version 2.0\n// that can be found in the LICENSE file.\n\n// +build !debug\n\npackage main\n\nimport (\n\t\"io\"\n\t\"io... | go | edit | 0 | 1 | apache-2.0 | 33843bea85a4974a63f583b4d2dbf308e1c0c84b | wi-ed/wi | non_debug.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage errors\n\nimport \"fmt\"\n\ntype HttpError interface {\n\tError\n\tStatusCode() int\n\tHeaders() string\n\tBody() string\n}\n\ntype httpError struct {\n\tstatusCode int\n\theaders string\n\tbody string\n\tcode string\... | go | edit | 0 | 2 | apache-2.0 | 67f9a654b4fc460c345ccfc3d120b850aee56fee | cloudfoundry/cli,cloudfoundry/cli,cloudfoundry/cli | src/cf/errors/http_error.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage api\n\nimport (\n\t\"github.com/docker/notary/signer\"\n\t\"github.com/docker/notary/signer/keys\"\n\n\tpb \"github.com/docker/notary/proto\"\n)\n\nfunc FindKeyByID(sigServices signer.SigningServiceIndex, keyID *pb.KeyID) (*pb.PublicKey... | go | edit | 0 | 3 | apache-2.0 | c82440258f54d5a1a8eb661765a06e7aa95a717a | bdwill/docker.github.io,docker/docker.github.io,docker/notary,johnstep/docker.github.io,docker/docker.github.io,jfrazelle/notary,anweiss/docker.github.io,joeuo/docker.github.io,johnstep/docker.github.io,vdemeester/notary,alexisbellido/docker.github.io,jfrazelle/notary,dqminh/notary,bsmr-docker/notary,bgrissin/notary,cy... | signer/api/find_key.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/Bowbaq/scala-imports\"\n\t\"github.com/codegangsta/cli\"\n\t\"github.com/spf13/viper\"\n)\n\nvar (\n\tVersion string\n\tconfig scalaimports.Config\n)\n\nfunc init() {\n\tviper.Set... | go | edit | 9 | 4 | mit | 7af6b67e2c52e289f1f660b0d0938d86c22ef3a3 | Bowbaq/scala-imports | cmd/fix-imports/main.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage b2\n\nimport ()\n\ntype B2 struct {\n\tAccountID string\n\tApplicationKey string\n\tAuthorizationToken string\n\tApiUrl string\n\tDownloadUrl string\n}\n\nfunc MakeB2(accountId, appKey string) (*B2, error... | go | edit | 3 | 5 | isc | 15f52f3dcb328650c7357f654ae6d5391ca9362f | ifo/go.b2,ifo/b2 | api.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage common\n\ntype NetString []byte\n\n// implement encoding.TextMarshaller interface to treat []byte as raw string\n// by other encoders/serializers (e.g. JSON)\n\nfunc (n NetString) MarshalText() ([]byte, error) {\n\treturn n, nil\n}\n\n`... | go | edit | 0 | 1 | mit | d0dbb5ec448c78d5902bca454dc5f62e9cdd6ccb | yapdns/yapdnsbeat,yapdns/yapdnsbeat | libbeat/common/string.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage types\n\n// DataFreshness codes for a specific data freshness requirement: realtime or base_schedule\ntype DataFreshness string\n\nconst (\n\t// DataFreshnessRealTime means you'll get undisrupted journeys\n\tDataFreshnessRealTime DataFr... | go | edit | 0 | 0 | unlicense | d9a4c9242f7759e5b9dc7ac853c1a6799b584d44 | aabizri/navitia,aabizri/navitia | common.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage mastodon\n\nimport (\n\t\"encoding/base64\"\n\t\"net/http\"\n\t\"os\"\n)\n\nfunc Base64EncodeFileName(filename string) (string, error) {\n\tfile, err := os.Open(filename)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer file.Close... | go | edit | 0 | 3 | mit | 727e6d8c543307c823af702d16b38fc91fc77cd1 | mattn/go-mastodon,178inaba/go-mastodon,mattn/go-mastodon | helper.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"go.skia.org/infra/go/gce\"\n\t\"go.skia.org/infra/go/gce/server\"\n)\n\nfunc MonitoringBase(name, ipAddress string) *gce.Instance {\n\tvm := server.Server20170613(name)\n\tvm.DataDisk.SizeGb = 1000\n\tvm.DataDisk.T... | go | edit | 0 | 1 | bsd-3-clause | 5d7f4a76d077e30be17a32d75ad9a713ff019f85 | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot | monitoring/vm.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage testdb\n\nimport (\n\tr \"github.com/dancannon/gorethink\"\n\t\"github.com/materials-commons/mcstore/pkg/db\"\n)\n\nvar session *r.Session\n\nfunc RSession() *r.Session {\n\tif session == nil {\n\t\tsession = db.RSessionUsingMust(\"loca... | go | edit | 0 | 2 | mit | 06c0856961c3def11f2af425f41717e1bf7388cc | materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore | pkg/testdb/rsession.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"os\"\n\n\t\"github.com/anacrolix/torrent\"\n)\n\n// SeekableContent describes an io.ReadSeeker that can be closed as well.\ntype SeekableContent interface {\n\tio.ReadSeeker\n\tio.Closer\n}\n\n// FileEntr... | go | edit | 3 | 1 | mit | 1761a581e0bc09861d13260de44102f90046c324 | Sioro-Neoku/go-peerflix | fileEntry.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\tlog15 \"gopkg.in/inconshreveable/log15.v2\"\n\n\t\"github.com/CyCoreSystems/ari/client/native\"\n)\n\nfunc main() {\n\tif i := run(); i != 0 {\n\t\tos.Exit(i)\n\t}\n}\n\nfunc run() int {\n\n\t// setup log... | go | edit | 0 | 3 | apache-2.0 | 3b1f5833628c5a10a133a62c62d3b7263b0b49f9 | baldrailers/ari,baldrailers/ari | _examples/helloworld/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build acceptance\n\npackage app\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/DATA-DOG/godog\"\n)\n\nfunc init() {\n\truns = append(runs, func() int {\n\t\tformat := \"progress\"\n\t\tfor _, arg := range os.Args[1:] {\n\t\t\t// go tes... | go | edit | 6 | 3 | mit | d5fb5ff8584ef182ba3e58fe32148a6d0dc26440 | deshboard/boilerplate-model-service,deshboard/boilerplate-grpc-service | app/acceptance_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage plugins\n\nimport . \"github.com/osmano807/joker/interfaces\"\n\ntype Imgur struct {\n\tname string\n}\n\nfunc (p *Imgur) Name() string {\n\treturn p.name\n}\n\nfunc (p *Imgur) Init() {\n\tp.name = \"Imgur\"\n}\n\nfunc (p *Imgur) Handle... | go | edit | 18 | 2 | bsd-2-clause | 77c33ffbadc89be6b36d3e021b9fe53ea77db754 | osmano807/joker | plugins/imgur.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"os/user\"\n\t\"path/filepath\"\n)\n\nfunc GetUserCacheDirectory() string {\n\tif baseDir := os.Getenv(\"XDG_CACHE_HOME\"); baseDir != \"\" {\n\t\treturn filepath.Join(baseDir, \"rfc\")\n\t}\n\n\tif user, ... | go | edit | 0 | 4 | mit | e69c1515dd84649b0cfa338912e4cb05f0190152 | kaorimatz/rfcs | util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage assert\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\ntype location struct {\n\tTest string\n\tFileName string\n\tLine int\n}\n\ntype errorLogger interface {\n\tLog(location *location, message string)\n}\n\nvar theLogger error... | go | edit | 0 | 3 | mit | 06d334e45a4e03f73ebf83bb285b3a4f1283d5f7 | assertgo/assert,assertgo/assert,OrdonTeam/assert,OrdonTeam/assert | error_logger_impl.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"time\"\n\n\t\"github.com/Symantec/Dominator/lib/srpc\"\n\t\"github.com/Symantec/Dominator/proto/imageserver\"\n)\n\nfunc (t *srpcType) GetImage(conn *srpc.Conn,\n\trequest imageserver.GetImageRequest,\n\treply *ima... | go | edit | 6 | 8 | apache-2.0 | 2a056929682c75191190e7319af9ade106297476 | keep94/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator | imageserver/rpcd/getImage.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build !windows,!linux\n\npackage chrootarchive // import \"github.com/docker/docker/pkg/chrootarchive\"\n\nimport \"golang.org/x/sys/unix\"\n\nfunc chroot(path string) error {\n\tif err := unix.Chroot(path); err != nil {\n\t\treturn err\n\t... | go | edit | 0 | 2 | apache-2.0 | 34d5b8867fe83403a6998d043a32a49e087f2477 | nalind/docker,AkihiroSuda/docker,paralin/docker,justincormack/docker,nalind/docker,crosbymichael/docker,yosifkit/docker,SvenDowideit/docker,moby/moby,SvenDowideit/docker,djs55/docker,moby/moby,trebonian/docker,trebonian/docker,ibuildthecloud/docker,jimjag/docker,moul/docker,kolyshkin/moby,docker/docker,nawawi/docker,jv... | pkg/chrootarchive/chroot_unix.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage instana\n\nimport \"testing\"\n\n// Trace IDs (and Span IDs) are based on Java Signed Long datatype\nconst MinUint64 = uint64(0)\nconst MaxUint64 = uint64(18446744073709551615)\nconst MinInt64 = int64(-9223372036854775808)\nconst MaxInt... | go | edit | 3 | 2 | mit | 041f2d1f132a3e63fac38d6f4830ddec4804edd9 | instana/golang-sensor,instana/golang-sensor | util_internal_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/gorilla/mux\"\n\t\"log\"\n\t\"net/http\"\n\t\"fmt\"\n)\n\nfunc main() {\n\tr := mux.NewRouter()\n\tr.HandleFunc(\"/\", homeHandler)\n\tr.HandleFunc(\"/products\", productsHandler)\n\tr.HandleFunc(\"/prod... | go | edit | 0 | 1 | mit | bc8fc4ea9c764a79ea4e6817653100eb09b22677 | daniel-bryant-uk/go-book-exp | webserver/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2013 Flo Lauber <<EMAIL>>. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// TODO(flo):\n// - support password protected MUC rooms\n// - cleanu... | go | edit | 18 | 2 | bsd-3-clause | 7568e7172819ffc683c546d917654c16b89982d7 | nb-titan/go-xmpp,pranavraja/go-xmpp,eagafonov/go-xmpp,titan-x/go-xmpp,dullgiulio/go-xmpp,ordbogen/go-xmpp,Like-all/go-xmpp,skiz/go-xmpp,mattn/go-xmpp | xmpp_muc.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage players\n\nimport \"errors\"\nimport \"github.com/m4rw3r/uuid\"\nimport \"golang.org/x/crypto/bcrypt\"\n\n//import \"fmt\"\n\n// The user associated with a player\ntype User struct {\n\tUsername string `json:\"username\"`\n\tpassword st... | go | edit | 9 | 3 | apache-2.0 | cf2d3848331b9f179835074d2a981617d9ae514a | ckpt/backend-services,ckpt/backend-services | players/users.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage log\n\ntype Logger interface {\n\tFatal(v ...interface{})\n\tFatalf(format string, v ...interface{})\n\tFatalln(v ...interface{})\n\tPanic(v ...interface{})\n\tPanicf(format string, v ...interface{})\n\tPanicln(v ...interface{})\n\tPrin... | go | edit | 0 | 0 | apache-2.0 | 7dd5b0e0403672673ab5844cd1f07b1e17358679 | Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator | lib/log/api.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\n\t\"github.com/gorilla/mux\"\n\t\"github.com/sirupsen/logrus\"\n)\n\n// Server provides the web UI for interacting with the application. Users can\n// login, post suggestions, and queue i... | go | edit | 6 | 2 | mit | 5f250647f4e9bad5178ad40d10b29cd3b56a5cdd | ReformedDevs/anonbot,ReformedDevs/anonbot,ReformedDevs/anonbot | server/server.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage slackapi\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n)\n\nfunc CheckResponse(t *testing.T, x interface{}, y string) {\n\tout, err := json.Marshal(x)\n\tif err != nil {\n\t\tt.Fatal(\"json fromat;\", err)\n\t}\n\tif string(out) != y... | go | edit | 9 | 3 | mit | d88c143068752c24375a23ed48434604499b2422 | cixtor/slackapi | slackapi_test.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage axis\n\n// Provider is the interface that wraps methods\n// to manipulate position\ntype Provider interface {\n\tCurrent() Position\n\tSleep(Distance)\n\tAfter(Distance) <-chan Position\n\tAfterFunc(Distance, func(Position)) Watcher\n\t... | go | edit | 18 | 0 | mit | 23e9f8fae329f0527ed22317abb85a5859546417 | squioc/axis | provider.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"gopkg.in/alecthomas/kingpin.v2\"\n)\n\nvar (\n\thost = kingpin.Flag(\"host\", \"Host to bind webserver to\").Default(\"127.0.0.1\").IP()\n\tport = kingpin.Flag(\"port\", \"Port to bind webserver to\").D... | go | edit | 9 | 0 | mit | 4a1385d1e00564d7e9147a799741dc339efecaf2 | lukevers/chitchat,lukevers/chitchat,lukevers/chitchat | flags.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage cas\n\nimport (\n\t\"log\"\n)\n\nconst (\n\t_ = iota\n\tDEBUG\n\tINFO\n\tWARN\n)\n\n// Utility functions for logging messages\nfunc logMessage(actualLogLevel, msgLogLevel, msg string, ) {\n\tif actualLogLevel <= msgLogLevel {\n\t\tlog.P... | go | edit | 0 | 2 | isc | bb2d16e9ce3a9ba52da19f6344fea83e1edd726a | t3hmrman/casgo,t3hmrman/casgo,t3hmrman/casgo,t3hmrman/casgo | cas/util.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage ref\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"k8s.io/apimachinery/pkg/api/meta\"\n\t\"k8s.io/apimachinery/pkg/runtime\"\n)\n\nvar NodeNotFound = \"can not build dialer to\"\n\nfunc IsNodeNotFound(err error) bool {\n\treturn strings.C... | go | edit | 0 | 2 | apache-2.0 | a4308d1c7d3dac64808a326b397215cff0f527c2 | cjellick/rancher,cjellick/rancher,rancher/rancher,cjellick/rancher,rancherio/rancher,rancher/rancher,rancherio/rancher,rancher/rancher,rancher/rancher | pkg/ref/parse.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"runtime\"\n\n\t\"github.com/shurcooL/trayhost\"\n)\n\nfunc main() {\n\truntime.LockOSThread()\n\n\tmenuItems := trayhost.MenuItems{\n\t\ttrayhost.MenuItem{\n\t\t\tTitle: \"Instant Share\... | go | edit | 0 | 2 | mit | dd426f20f24823c89e46f815c91d1846b2ff7c83 | pavben/InstantShare,pavben/InstantShare | client/main.go | rejected_duplicate | Near-duplicate of sample 117281 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage frontend\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha1\"\n)\n\n// ComputeHMAC of a message using a specific key\nfunc ComputeHMAC(message []byte, key string) []byte {\n\tmac := hmac.New(sha1.New, []byte(key))\n\tmac.Write(message)\n\t... | go | edit | 0 | 1 | bsd-3-clause | 3434e00fe6939d20d76fa7d05a9288c7b1d7a1f3 | cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,cvmfs/cvmfs,DrDaveD/cvmfs,cvmfs/cvmfs | gateway/internal/gateway/frontend/hmac.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build windows\n\npackage etc\n\n//go:generate cmd /c go run mkversioninfo.go version.txt version.txt < versioninfo.json > v.json && go run github.com/josephspurrier/goversioninfo/cmd/goversioninfo -icon=nyagos.ico -o ..\\nyagos.syso v.json ... | go | edit | 0 | 0 | bsd-3-clause | 8a235f0a643c8ebe98a3a85b11aae73e8517ea07 | zetamatta/nyagos,tsuyoshicho/nyagos | Etc/version.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage sacloud\n\n// propDiskConnection ディスク接続情報内包型\ntype propDiskConnection struct {\n\tConnection EDiskConnection `json:\",omitempty\"` // ディスク接続方法\n\tConnectionOrder int `json:\",omitempty\"` // コネクション順序\n\n}\n\n// GetDiskC... | go | edit | 9 | 1 | apache-2.0 | 17e917ddda383c08ba0a79e006a2659ac93508f9 | sacloud/libsacloud,yamamoto-febc/libsacloud | sacloud/prop_disk_connection.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage imgwizard\n\nimport (\n\t\"bytes\"\n\t\"image\"\n\t\"image/png\"\n\t\"net/http\"\n\n\t\"github.com/foobaz/lossypng/lossypng\"\n\t\"github.com/shifr/vips\"\n)\n\nfunc Transform(img_buff *[]byte, ctx *Context) {\n\tvar err error\n\tbuf :=... | go | edit | 21 | 7 | mit | 8d834e22da1d8159ec61c9ee6a9a6542ca30fbd3 | shifr/imgwizard | transform.go | rejected_lint | Too many lint violations: 21 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build darwin freebsd openbsd netbsd\n// +build !appengine\n\npackage isatty\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nconst ioctlReadTermios = syscall.TIOCGETA\n\n// IsTerminal return true if the file descriptor is terminal.\nfunc IsTe... | go | edit | 3 | 1 | mit | 089e34f010baf1bc46703001b0dd0f28a58523fd | mattn/go-isatty,mattn/go-isatty | isatty_bsd.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage grid\n\nimport \"fmt\"\n\n// ExportService handles communication with the Export related\n// methods of the GRiD API.\n//\n// GRiD API docs: https://github.com/CRREL/GRiD-API/blob/v0.0/composed_api.rst#get-export-details\ntype ExportSer... | go | edit | 9 | 1 | apache-2.0 | 79d4ef67b694ce875b11649cc504e32b22dab098 | venicegeo/grid-sdk-go,venicegeo/grid-sdk-go | export.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Some utility functions, which are classified to a certain package.\npackage utils\n\nimport \"runtime\"\n\nvar (\n\tMac = \"\\r\"\n\tUnix = \"\\n\"\n\tWindows = \"\\r\\n\"\n)\n\nvar newlines map[string]string\n\nfunc init() {\n\tnewli... | go | edit | 0 | 2 | apache-2.0 | 32f3e4f293119178e819ad74f90f9b95706e1979 | xgfone/go-tools | utils/newline.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage rtp\n\n// Depacketizer depacketizes a RTP payload, removing any RTP specific data from the payload\ntype Depacketizer interface {\n\tUnmarshal(packet *Packet) ([]byte, error)\n}\n\n```\n\nApply this change: Update Depacketizer interface... | go | edit | 0 | 0 | mit | 34c6ce978ad576469ea43860fecc48fad612c7c8 | pion/rtp | depacketizer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage def\n\nimport (\n\t\"bytes\"\n\n\t\"github.com/go-yaml/yaml\"\n\t\"github.com/ugorji/go/codec\"\n\n\t\"polydawn.net/repeatr/lib/cereal\"\n)\n\nvar codecBounceHandler = &codec.CborHandle{}\n\nfunc ParseYaml(ser []byte) *Formula {\n\t// T... | go | edit | 15 | 4 | apache-2.0 | 82f38d10ceb089c70209019cfa39985743986dfa | subuser-security/repeatr,polydawn/repeatr,polydawn/repeatr,subuser-security/repeatr | def/parse.go | rejected_lint | Too many lint violations: 15 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage file\n\nimport (\n\t\"log\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n)\n\n// Given its relative path with respect to the LXD surce tree, return the full\n// path of a file.\nfunc absPath(path string) string {\n\t// We expect ... | go | edit | 0 | 3 | apache-2.0 | e9092f3eb01a42b95ab9f597f35c875f42097543 | hallyn/lxd,Skarlso/lxd,hallyn/lxd,Skarlso/lxd,lxc/lxd,stgraber/lxd,mjeanson/lxd,stgraber/lxd,atxwebs/lxd,lxc/lxd,stgraber/lxd,mjeanson/lxd,atxwebs/lxd,lxc/lxd,lxc/lxd,stgraber/lxd,stgraber/lxd,hallyn/lxd,Skarlso/lxd,stgraber/lxd,atxwebs/lxd,hallyn/lxd,hallyn/lxd,lxc/lxd,lxc/lxd,mjeanson/lxd,hallyn/lxd,atxwebs/lxd,lxc/l... | shared/generate/file/path.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// +build mig_forward\n\npackage mig\n\nconst forward_only = true\n\ntype Step struct {\n\tName string\n\tMigrate string\n\tPrereq string\n\thash string\n\tfile string\n\tpkg string\n\torder string\n}\n\nfunc (step *Step) revert... | go | edit | 0 | 1 | mit | fbea3add036098159a4149f0c5dbafb74e4403ba | jargv/mig | forwardOnlyStep.go | accepted | null | true |
[
{
"role": "user",
"content": "Write go code for the following: Make some actual main method to play with.\n\nThough it's clear that I don't have any idea how this describe method is meant to be used... it does actually work, and is presumably doing something slightly nontrivial.\n\nSigned-off-by: Eric Myhre... | go | new_file | 6 | 3 | apache-2.0 | c9febb2239ed0f05fb24012a43e55e2a455fcef8 | polydawn/danggit,polydawn/danggit | cmd/danggit/danggit.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// generated by stringer -type=NodeType; DO NOT EDIT\n\npackage parser\n\nimport \"fmt\"\n\nconst _NodeType_name = \"NodeTypeErrorNodeTypeGlobalModuleNodeTypeFileNodeTypeCommentNodeTypeCustomOpNodeTypeAnnotationNodeTypeParameterNodeTypeDeclarat... | go | edit | 6 | 3 | bsd-3-clause | c17f8758d9176b8efecba37540ceacc8378d8e9d | Serulian/compiler,Serulian/compiler | webidl/parser/nodetype_string.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage engine\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\ntype Dot struct {\n\tX uint8\n\tY uint8\n}\n\n// Equals compares two dots\nfunc (d1 Dot) Equals(d2 Dot) bool {\n\treturn d1 == d2 || (d1.X == d2.X && d1.Y == d2.Y)\n}\n\n// Implem... | go | edit | 0 | 4 | bsd-2-clause | 0086e97c4c7a2be68f8959ec1e1fbab96ca62e70 | ivan1993spb/clever-snake | engine/dot.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage containers\n\nimport (\n\t\"github.com/fsouza/go-dockerclient\"\n)\n\ntype DockerRuntime struct {\n\tClient *docker.Client\n}\n\nfunc (r DockerRuntime) isRelated(volume string, container *docker.Container) bool {\n\tfor _, mount := rang... | go | edit | 9 | 5 | apache-2.0 | 94abb0a3b762b06afcb443fa602b2c70332bf5dd | ClusterHQ/dvol,ClusterHQ/dvol,ClusterHQ/dvol | pkg/containers/docker.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/sony/gobreaker\"\n)\n\nvar cb *gobreaker.CircuitBreaker\n\nfunc init() {\n\tvar st gobreaker.Settings\n\tst.Name = \"HTTP GET\"\n\tst.ReadyToTrip ... | go | edit | 0 | 3 | mit | cd36179573e1a3f8f4f80f0f4fbef9299e41fc67 | sony/gobreaker | example/http_breaker.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage adapter\n\nimport (\n\t\"errors\"\n\n\t\"github.com/golang/glog\"\n\n\tkauthorizer \"k8s.io/kubernetes/pkg/auth/authorizer\"\n\n\toauthorizer \"github.com/openshift/origin/pkg/authorization/authorizer\"\n)\n\ntype AdapterAuthorizer stru... | go | edit | 3 | 2 | apache-2.0 | 1a738ab5124ec1b5f5b08c1e71bb5c650ddb4529 | imcsk8/origin,hroyrh/origin,liangxia/origin,dgoodwin/origin,chmouel/origin,php-coder/origin,stevekuznetsov/origin,soltysh/origin,dgoodwin/origin,jeremyeder/origin,thrasher-redhat/origin,coreydaley/origin,danmcp/origin,enj/origin,hroyrh/origin,rhamilto/origin,dcbw/origin,tnozicka/origin,rajatchopra/origin,ironcladlou/or... | pkg/authorization/authorizer/adapter/authorizer.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage migration\n\nimport (\n\t\"k8s.io/client-go/kubernetes\"\n\n\tv1 \"github.com/sapcc/kubernikus/pkg/apis/kubernikus/v1\"\n\t\"github.com/sapcc/kubernikus/pkg/client/openstack\"\n\t\"github.com/sapcc/kubernikus/pkg/util\"\n\tetcd_util \"g... | go | edit | 0 | 5 | apache-2.0 | b401af4f131d4b70e99d29a189b574b14fcc7002 | sapcc/kubernikus,sapcc/kubernikus,sapcc/kubernikus | pkg/migration/3_etcdbr_create_storage_container.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/yofu/dxf\"\n\t\"github.com/yofu/dxf/entity\"\n)\n\nfunc main() {\n\tdr, err := dxf.Open(\"point.dxf\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfor _, e := range dr.Entities... | go | edit | 0 | 4 | mit | d3af75c6eb6e143bc0f887a5993a9a6a3c700857 | yofu/dxf | example/point/point.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage leetcode\n\n/**\n * Definition for a binary tree node.\n * type TreeNode struct {\n * Val int\n * Left *TreeNode\n * Right *TreeNode\n * }\n */\nfunc sumNumbers(root *TreeNode) int {\n\tif root == nil {\n\t\treturn 0\n\t} el... | go | edit | 0 | 6 | mit | c47b3849a26b9129de9705726479f1606207abd9 | motomux/go-algo | leetcode/129_sum_root_to_leaf_numbers.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\n\t\"github.com/robertkrimen/otto\"\n\t\"github.com/robertkrimen/otto/underscore\"\n)\n\nvar flag_underscore *bool = flag.Bool(\"underscore\", true, \"Load underscore ... | go | edit | 0 | 4 | mit | 5e6214b12d9a839ade379a270690b51ec41e7195 | xyproto/otto,xyproto/otto | otto/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage routes\n\nimport (\n\t\"github.com/DVI-GI-2017/Jira__backend/handlers\"\n)\n\nfunc InitRouter(r *router) {\n\tr.Post(\"/signup\", handlers.RegisterUser)\n\tr.Post(\"/signin\", handlers.Login)\n}\n\n```\n\nApply this change: Add more ver... | go | edit | 3 | 3 | mit | 91fb95b9683221d032051bf4d0f79eb422bb232d | DVI-GI-2017/Jira__backend | routes/routes.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage infrastructure\n\nimport (\n\t\"io/ioutil\"\n\n\t\"gopkg.in/yaml.v2\"\n)\n\ntype Configuration struct {\n\tPort string `yaml:\"port\"`\n\tClientID string `yaml:\"clientID\"`\n\tClientSecret string `yaml:\"clientSecret\... | go | edit | 3 | 3 | mit | 0f1cdb44d2b58baf46f4bade9def266c80484b88 | Tinker-Ware/gh-service | infrastructure/yaml.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage maxreader_test\n\nimport (\n\t\"io/ioutil\"\n\t\"strings\"\n\t\"testing\"\n\n\t\".\"\n)\n\nfunc Test(t *testing.T) {\n\ttype entry struct {\n\t\ts string\n\t\tok bool\n\t}\n\n\ttable := []entry{\n\t\t{\"\", true},\n\t\t{\"h\", true},\n... | go | edit | 0 | 7 | bsd-2-clause | 0973942020260734e49a59cacb35d78c64aea566 | ninchat/maxreader | read_test.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage reuseport\n\nimport (\n\t\"context\"\n\t\"net\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc testDialFromListeningPort(t *testing.T, network string) {\n\tlc := net.ListenConfig{\n\t\tControl: Control,\n\t}\n\tc... | go | edit | 6 | 1 | isc | f46bbb57b12259dd409f010a797f4fc8f1785a91 | libp2p/go-reuseport,jbenet/go-reuseport | reuse_test.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage keeper\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\n\t\"github.com/cosmos/cosmos-sdk/codec\"\n\tsdk \"github.com/cosmos/cosmos-sdk/types\"\n\t\"github.com/tendermint/tendermint/libs/log\"\n\t\"github.com/zigbee-alliance/distributed-compliance-... | go | edit | 0 | 1 | apache-2.0 | fe0fd23b2c499738117e1f0b7893f19ce17db87a | zigbee-alliance/distributed-compliance-ledger,zigbee-alliance/distributed-compliance-ledger,zigbee-alliance/distributed-compliance-ledger,zigbee-alliance/distributed-compliance-ledger,zigbee-alliance/distributed-compliance-ledger,zigbee-alliance/distributed-compliance-ledger | x/validator/keeper/keeper.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n/*\nCopyright (c) 2014 VMware, Inc. All Rights Reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http... | go | edit | 9 | 3 | apache-2.0 | 444617bb2ef8c4a1221ef8b537d82deb69a5d631 | juju/govmomi,juju/govmomi,abathla/govmomi,mevansam/vsphere-govmomi,mevansam/vsphere-govmomi,ilikejam/govmomi,frapposelli/govmomi,jrmycanady/govmomi,abathla/govmomi,logankimmel/govmomi,higebu/govmomi,chrislovecnm/govmomi,higebu/govmomi,anexia-it/govmomi,pietern/govmomi,bruceadowns/govmomi,tkak/govmomi,caglar10ur/govmomi... | virtual_machine.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/libgit2/git2go\"\n\t\"github.com/urfave/cli\"\n)\n\nfunc GitSeekretCheck(c *cli.Context) error {\n\terr := gs.LoadConfig(true)\n\tif git.IsErrorClass(err, git.ErrClassConfig) {\n\t\treturn fmt... | go | edit | 9 | 7 | apache-2.0 | a824d28ae5936586b5045b56e42462c1f8d0f00b | apuigsech/git-seekret | main_check.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage misc\n\nvar Schools = map[string][]string{\n\t\"Da Vinci Communications\": []string{\n\t\t\"davinci communications\",\n\t},\n\t\"El Segundo High School\": []string{\n\t\t\"es\",\n\t\t\"eshs\",\n\t\t\"el segundo\",\n\t\t\"gundo\",\n\t},\... | go | edit | 0 | 0 | mit | a4cffbaf359a022748413daa22da03f5b4119265 | zachlatta/southbayfession,zachlatta/southbayfession,zachlatta/southbayfession,zachlatta/southbayfession | misc/schools.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage hal\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\n// RenderToString renders the provided data as a json string\nfunc RenderToString(data interface{}, pretty bool) ([]byte, error) {\n\tif pretty {\n\t\treturn json.MarshalIndent(... | go | edit | 3 | 2 | apache-2.0 | 23cd2122fd484005167117888c1c5b9247efcc40 | stellar/horizon,stellar/horizon,stellar/horizon | src/github.com/stellar/horizon/render/hal/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n//\n// Use and distribution licensed under the Apache license version 2.\n//\n// See the COPYING file in the root project directory for full text.\n//\n\npackage ghw\n\nvar (\n\tKB int64 = 1024\n\tMB int64 = KB * 1024\n\tGB int64 = MB * 1024\n\... | go | edit | 0 | 6 | apache-2.0 | c036b8559e2e456aacd23066b0cbed71888c3cb2 | jaypipes/ghw,jaypipes/ghw | units.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/fmi/go-homework/geom\"\n)\n\nfunc TestSampleSimpleOperations(t *testing.T) {\n\tvar prim geom.Intersectable\n\n\ta, b, c := geom.NewVector(-1, -1, 0), geom.NewVector(1, -1, 0), geom.NewV... | go | edit | 12 | 2 | mit | f0115955b729476a7fa6dd9b86348b8630369e45 | fmi/go-homework | tasks/03/sample_test.go | rejected_lint | Too many lint violations: 12 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage instance\n\nimport (\n\tbosherr \"github.com/cloudfoundry/bosh-utils/errors\"\n\n\t\"bosh-google-cpi/api\"\n\t\"bosh-google-cpi/util\"\n)\n\nfunc (i GoogleInstanceService) Reboot(id string) error {\n\tinstance, found, err := i.Find(id, ... | go | edit | 9 | 9 | apache-2.0 | 248f3205ac1f3cefa6255dbef9b8a5c77ffada1e | cloudfoundry-incubator/bosh-google-cpi-release,evandbrown/bosh-google-cpi-release,evandbrown/bosh-google-cpi-release,cloudfoundry-incubator/bosh-google-cpi-release,cloudfoundry-incubator/bosh-google-cpi-release,evandbrown/bosh-google-cpi-release,evandbrown/bosh-google-cpi-release,cloudfoundry-incubator/bosh-google-cpi-... | src/bosh-google-cpi/google/instance_service/google_instance_service_reboot.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"./app/api\"\n\t\"./app/controllers\"\n\t\"./db\"\n\t\"github.com/codegangsta/martini\"\n\t\"github.com/codegangsta/martini-contrib/render\"\n)\n\n/**\n * Connect to database.\n */\nfunc dbConnection() {\n\tdb.Init(... | go | edit | 3 | 1 | mit | 19b02871d27a36a8d1c4aa22cf9257f5593cd4c3 | bhtz/go-web-boilerplate | app.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"path\"\n\n\t\"github.com/skia-dev/glog\"\n\t\"go.skia.org/infra/go/auth\"\n\t\"go.skia.org/infra/go/buildbucket\"\n\t\"go.skia.org/infra/go/common\"\n)\n\nvar (\n\tid = flag.String(\"id\", \"\", \"... | go | edit | 0 | 6 | bsd-3-clause | 9386b77427804d675a125c69c7f33f7224bf9642 | google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot | build_scheduler/go/get_build/main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\n// Copyright 2017 Eric Daniels\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apac... | go | edit | 0 | 1 | apache-2.0 | d3e0b484e37ef86bb6c3597fd06a7f09685069e9 | edaniels/go-net-utils | track/http_client.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\n\t\"github.com/litl/galaxy/log\"\n)\n\nvar (\n\t// Location of the default config.\n\t// This will not be overwritten by shuttle.\n\tdefaultConfig string\n\n\t// Location of the live config which is updat... | go | edit | 6 | 3 | mit | 021903d1ff70343a09e5cc8669c46a91187a68b7 | litl/shuttle,jwilder/shuttle,joeshaw/shuttle | main.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n)\n\nfunc main() {\n\tif len(os.Args) == 4 {\n\t\tfmt.Println(\"UNSUPPORTED\")\n\t\tos.Exit(0)\n\t} else if len(os.Args) != 3 {\n\t\tfmt.Printf(\"usage: %v <host> <po... | go | edit | 0 | 8 | mit | c75cb871fa03912dac7d3e94cf6decaeadfcba66 | ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls,ouspg/trytls | stubs/go-nethttp/run.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage checks_test\n\nimport (\n\t. \"checks\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Consul DNS checks\", func() {\n\tIt(\"returns an error when host is not known\", func() {\n\t\terr := Con... | go | edit | 18 | 1 | apache-2.0 | 69aaaa10381d9487ff3cf9990fca3780e895e450 | cloudfoundry-incubator/hakim | src/checks/consul_dns_check_test.go | rejected_lint | Too many lint violations: 18 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"fmt\"\n \"os\"\n \"path/filepath\"\n\n \"github.com/gmcnaughton/gofindhdr/findhdr\"\n)\n\nfunc main() {\n inpath := \"/Users/gmcnaughton/Pictures/Photos Library.photoslibrary/Masters/2017/02\"\n // inpath := \... | go | edit | 0 | 5 | mit | 7b77ca60d0b59a265f8b681cd1d9eb4abc981902 | gmcnaughton/findhdr | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\n\t\"github.com/aws/aws-sdk-go/aws/session\"\n\t\"github.com/aws/aws-sdk-go/service/cloudwatchevents\"\n)\n\nfunc main() {\n\tvar apply bool\n\tvar dryrun bool\n\n\tflag.BoolVar(&apply, \"apply\... | go | edit | 0 | 3 | mit | caed85323c605cf884ca58db74c86d113a8df6d6 | unasuke/maekawa | main.go | accepted | null | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\nfunc main() {\n\t// Read in the config file\n\tconfText, err := ioutil.ReadFile(\"gologgen.conf\")\n\tif err != nil {\n\t\treturn\n\t}\... | go | edit | 6 | 3 | mit | 15a23a8bfa110ad992499bc754f958a05f17ed5f | FTWynn/gologgen | main.go | rejected_lint | Too many lint violations: 6 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"github.com/MaximeD/gost/conf\"\n\t\"github.com/MaximeD/gost/gist\"\n)\n\nvar baseUrl string = \"https://api.github.com/\"\n\n// get command line arguments\nvar gistDescriptionFlag = flag.String(\"descri... | go | edit | 9 | 5 | mit | 0f8f060cef86344634d7cb185fdf26a51a240474 | MaximeD/gost | gost.go | rejected_lint | Too many lint violations: 9 | true |
[
{
"role": "user",
"content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\tslackreporter \"github.com/ariarijp/horenso-reporter-slack/reporter\"\n\t\"github.com/bluele/slack\"\n)\n\nfunc main() {\n\ttoken := os.Getenv(\"SLACK_TOKEN\")\n\tgroupName := os.Getenv(\"SLACK_GROUP\")\n... | go | edit | 0 | 2 | mit | 88c5041300ef4670d5a6f2887f92243b57fa6be8 | ariarijp/horenso-reporter-slack | main.go | accepted | null | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.