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": "Write go code for the following: Write test cases for \"Shape\" and \"Index\"." }, { "role": "assistant", "content": "package types\n\nimport (\n\t\"testing\"\n)\n\nfunc TestShapeRetainsRowsAndColumns(t *testing.T) {\n\trows, columns := 2, 1\n\n\ts := NewShape(rows,...
go
new_file
6
3
mit
fc6099aaf53fc3bc43b1d7af8d2a26451de0f1be
mitsuse/matrix-go
internal/types/types_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\ntype ModelId uint16\n\n// These data types are defined in the SunSpec Information Model Specification.\n// http://sunspec.org/wp-content/uploads/2015/06/SunSpec-Information-Models-12041.pdf\n// In Version 1.8 of the document, th...
go
edit
0
0
bsd-3-clause
acabbb2f38954e259c8e73b10f0fe8e7c7e6601f
eightyeight/gosunspec,crabmusket/gosunspec,jonseymour/gosunspec
core/datatypes.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
e3ce7664494fd333eb271bccfa3f8ada9134ad8a
kubernetes-retired/cluster-registry,kubernetes-retired/cluster-registry
apis/federation/v1beta1/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage make\n\nimport (\n\t\"fmt\"\n\tlog \"github.com/Sirupsen/logrus\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n)\n\n// InstallFileSystem installs a basic private file system for any given input.\nfunc (Site *Site) InstallFileSystem(DirectoryPa...
go
edit
3
3
mit
757f06b2bce261d570a501bb41452495a0525150
fubarhouse/golang-drush
make/make_files.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\tlog \"github.com/Sirupsen/logrus\"\n\topenwhisk \"github.com/c3sr/openwhisk-go\"\n\tactions \"github.com/c3sr/openwhisk-go/client/actions\"\n\tmodels \"github.com/c3sr/openwhisk-go/models\"\n)\n\nfunc ma...
go
edit
0
3
apache-2.0
ace2231bcd7cf0979a21960b1c391023e33bef93
c3sr/openwhisk-go,c3sr/openwhisk-go
examples/add-action/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Test that blank imports in library packages are flagged.\n\n// Package foo ...\npackage foo\n\n// The instructions need to go before the imports below so they will not be\n// mistaken for documentation.\n\n/* MATCH /blank import/ */ import _...
go
edit
6
0
bsd-3-clause
2ade831e1630800dcd271ee654026219bddba4c8
lutzky/lint,tmc/lint,golang/lint,zimmski/lint,elgris/hint,kovetskiy/lint,darkliquid/lintci,gorcz/lint,hellosuper/gohint,JekaMas/hint,NichoZhang/lint
testdata/blank-import-lib.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage assets\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t. \"github.com/smartystreets/goconvey/convey\"\n)\n\nfunc TestMain(t *testing.T) {\n\tConvey(\"ETags generated on startup\", t, func() {\n\t\tSo(etags, ShouldHaveLength, len(_bindata))\...
go
edit
27
1
mit
bcaded91d17f9ac4a1b485e8f9b1561f33dfa31a
ONSdigital/florence,ONSdigital/florence,ONSdigital/florence,ONSdigital/florence
assets/etag_test.go
rejected_lint
Too many lint violations: 27
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"io\"\n\t\"net\"\n)\n\nfunc chkfatal(err error) {\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n\nfunc copyClose(a, b net.Conn) {\n\tdone := make(chan struct{})\n\toneWay := func(dst, src net.Conn) {\n\t\tio.Copy(dst,...
go
edit
3
2
apache-2.0
ae333fec8d617fdd27a32f7a2ba1efecf5ea076d
zenhack/sandstorm-znc,zenhack/sandstorm-znc,zenhack/sandstorm-znc,zenhack/sandstorm-znc,zenhack/sandstorm-znc
util.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage storage\n\nimport (\n\t\"testing\"\n\n\t\"os\"\n\n\t\"github.com/aws/aws-sdk-go/aws/credentials\"\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestAWSCredentialsFromConfig(t *testing.T) {\n\tchain := []*CredentialsProviderConfig...
go
edit
6
1
apache-2.0
a904307036f268f42bedf98cd2cc693942862b95
monax/hoard,monax/hoard,monax/hoard,monax/hoard
config/storage/s3_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage s3proxy\n\nimport (\n\t\"io\"\n\t\"net/http\"\n\t\"github.com/aws/aws-sdk-go/service/s3\"\n\t\"github.com/aws/aws-sdk-go/aws\"\n)\n\ntype S3BucketServer struct {\n\tBucket string\n\tsss *s3.S3\n}\n\nfunc NewS3BucketServer(bucketName str...
go
edit
0
3
mit
b82a241e409524ca3e2d313f22f1a4fa4e5735f4
mcoffin/s3proxy
s3proxy/handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2014 The Kubernetes Authors 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 ...
go
edit
0
4
apache-2.0
e16b9686bf17663885d527d592ed44a9e63ea95f
kubernetes/api
pkg/api/validation/events.go
accepted
null
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 ptypes\n\n// SwapBits swaps the bits of x at indices i and j, and...
go
edit
0
2
mit
5c8b671d9c7cb259e2a140c6f78d956a3700370d
mrekucci/epi,mrekucci/epi
ptypes/swapbits.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage json\n\nimport (\n\t\"github.com/polydawn/refmt/tok/fixtures\"\n)\n\ntype situation byte\n\nconst (\n\tsituationEncoding situation = 0x1\n\tsituationDecoding situation = 0x2\n)\n\nvar jsonFixtures = []struct {\n\ttitle string\n\tsequ...
go
edit
0
0
mit
65789d9920bab84d335d9706f6b9be5ce86ef02d
polydawn/go-xlate,polydawn/refmt,polydawn/go-xlate,polydawn/refmt
json/jsonFixtures_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage agent\n\nimport (\n\tboshvitals \"github.com/cloudfoundry/bosh-agent/platform/vitals\"\n)\n\ntype Heartbeat struct {\n\tDeployment string `json:\"deployment\"`\n\tJob *string `json:\"job\"`\n\tIndex *int...
go
edit
0
0
apache-2.0
39ae739fb8cbc388701168b0fbb24572929e9e6a
mattcui/bosh-agent,cloudfoundry/bosh-agent,mattcui/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent,mattcui/bosh-agent,cloudfoundry/bosh-agent,gu-bin/bosh-agent
agent/heartbeat.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\tfmt.Printf(\"Hello world!\\n\")\n}\n\n```\n\nApply this change: Add Sum and Divisor Algorithms" }, { "role": "assistant", "content": "package main\n\nimport (\n\t\"fmt\"\n)\...
go
edit
0
3
mit
bb0249730ee9c2bcc9a66655f9181717152abd12
benjic/euler
src/12/problem_12.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage jsify\n\nimport (\n\t\"testing\"\n)\n\nfunc Test_Example(t *testing.T) {\n\tstructs := make([]interface{}, 3)\n\tstructs[0] = &Foo{}\n\tstructs[1] = &Bar{}\n\tstructs[2] = &Baz{}\n\t_, err := GenerateJavascriptToString(structs)\n\tif er...
go
edit
24
3
apache-2.0
9ab7894481f59cbb9e4716def60c3e0a8ae38524
mattbaird/GoJSObjectGenerator
jsify_test.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2013 Marc Weistroff. All rights reserved.\n// Use of this source code is governed by a MIT\n// license that can be found in the LICENSE file.\n\npackage log\n\nimport (\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestMinimalLineFormatter...
go
edit
12
2
mit
9f8cfd7480b6adea5c945b4ef15d2b9caf23c542
marcw/log
formatter_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2018 The containerd Authors.\n// Copyright 2018 The gVisor Authors.\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...
go
edit
3
1
apache-2.0
0f62f21527b9014653de07fa366fb5b0f48fb16c
google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor,google/gvisor
pkg/shim/runtimeoptions/runtimeoptions.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/42wim/mm-go-irckit\"\n\t\"github.com/alexcesaro/log\"\n\t\"github.com/alexcesaro/log/golog\"\n\t\"net\"\n\t\"os\"\n)\n\nvar logger log.Logger = log.NullLogger\n\nfunc main() {\n\tlogger = golog.New(os.St...
go
edit
9
3
mit
f8341d859b10e9256e1d51e94867b21c866b79ea
42wim/matterircd,wikimedia/operations-software-matterircd
main.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pongo2\n\nimport (\n\t\"github.com/astaxie/beego\"\n\t\"github.com/astaxie/beego/context\"\n\tp2 \"github.com/flosch/pongo2\"\n\t\"sync\"\n)\n\ntype Context map[string]interface{}\n\nvar templates = map[string]*p2.Template{}\nvar mutex ...
go
edit
0
5
mit
beeae6854920fc197616144578e1d96f1cd97834
oal/beego-pongo2,trigrass2/beego-pongo2
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage reset\n\nimport (\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n)\n\nvar (\n\ttestModeOnce = sync.Once{}\n\t_testMode bool\n)\n\n// TestMode returns true if run as unit test\nfunc TestMode() bool {\n\ttestModeOnce.Do(func() {\n\t\t_testMode ...
go
edit
0
2
apache-2.0
c60de6a42a270fe1e68018d8694af6bee3023026
redforks/testing
reset/testmode.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model_validator\n\nimport (\n\t\"fmt\"\n\t\"github.com/asaskevich/govalidator\"\n\t\"github.com/centurylinkcloud/clc-go-cli/base\"\n\t\"strings\"\n)\n\nfunc ValidateModel(model interface{}) error {\n\t_, err := govalidator.ValidateStruc...
go
edit
0
3
apache-2.0
24f9da58b3f721972cc5c1fab71bea67962c43f7
CenturyLinkCloud/clc-go-cli,CenturyLinkCloud/clc-go-cli
model_validator/model_validator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gondole\n\nimport ()\nimport (\n\t\"github.com/sendgrid/rest\"\n\t\"fmt\"\n)\n\nconst (\n\tAPIVersion = \"0.0\"\n\n\tAPIEndpoint = \"/api/v1\"\n\n\tNoRedirect = \"urn:ietf:wg:oauth:2.0:oob\"\n)\n\n// prepareRequest insert all pre-define...
go
edit
0
1
mit
96542b7157e847a9ad9b771ecf4bd5af65639412
keltia/gondole
gondole.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2012 The Go 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// +build ignore\n\npackage main\n\nimport \"code.google.com/p/go-tour-french/p...
go
edit
0
4
bsd-3-clause
4f3edf5103f7bbe83fca9eeba4b7382de7d29124
dolmen/go-tour-fr,dupoxy/go-tour-fr,dupoxy/go-tour-fr,dolmen/go-tour-fr,dolmen/go-tour-fr,dupoxy/go-tour-fr
solutions/slices.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage go_camunda_client\n\ntype CamundaClient interface {\n\tStartProcess(processDefinitionKey string, request interface{}) (Process, error)\n\tGetProcess(processId string) (Process, error)\n\tGetProcessVariable(processId string, variableName...
go
edit
0
0
apache-2.0
ac7ac4e9945bd037d7178cbd5c8666402a57a8cd
bigbank-as/go_camunda_client
client_interface.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"time\"\n)\n\n// Deployment describes a deployment\ntype Deployment struct {\n\tID string `json:\"id\"`\n\tCreatedAt time.Time `json:\"created_at\"`\n\tImageName string `json:\"image_name\"`\n\tVersion ...
go
edit
0
0
apache-2.0
2cfcf087a3e27f6fca008a02088e1f43385a060b
kinvolk/scope,paulbellamy/scope,weaveworks/scope,alban/scope,alban/scope,weaveworks/scope,kinvolk/scope,weaveworks/scope,paulbellamy/scope,paulbellamy/scope,paulbellamy/scope,paulbellamy/scope,alban/scope,kinvolk/scope,kinvolk/scope,weaveworks/scope,alban/scope,alban/scope,kinvolk/scope,weaveworks/scope,paulbellamy/sco...
cmd/wcloud/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage statsd\n\nimport (\n\t\"time\"\n\n\t\"github.com/tecnickcom/statsd\"\n)\n\ntype MetricsService struct {\n\tstatsdClient *statsd.Client\n\tprefix string\n}\n\nfunc NewMetricsService() *MetricsService {\n\tstatsdClient, e := statsd....
go
edit
0
2
apache-2.0
ae64ca92de07f522322d5420d3814653366e7eb4
cloudfoundry-incubator/bits-service,cloudfoundry-incubator/bits-service,petergtz/bitsgo,cloudfoundry-incubator/bits-service,cloudfoundry-incubator/bits-service,petergtz/bitsgo,cloudfoundry-incubator/bits-service
statsd/metrics_service.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package linear provides a linear-algebra toolbox.\npackage linear\n\n// Tensor computes the tensor product of a number of vectors.\nfunc Tensor(data ...[]float64) []float64 {\n\tnd := len(data)\n\n\tdims := make([]int, nd)\n\tfor i := 0; i <...
go
edit
0
8
mit
012e96970b99a348a3fc5a310b5a7447f8ef8773
ready-steady/linear
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sudoku\n\nimport (\n\t\"fmt\"\n)\n\ntype SolveDirections []*SolveStep\n\nconst (\n\tONLY_LEGAL_NUMBER = iota\n)\n\ntype SolveStep struct {\n\tRow int\n\tCol int\n\tNum int\n\tTechnique SolveTechnique\n}\n\ntype SolveTe...
go
edit
9
2
apache-2.0
18d045ec20d9224f85bdfea0527f8959b113478e
jkomoros/sudoku,jkomoros/sudoku,jkomoros/sudoku
sudoku/human_solve.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\"code.google.com/p/goprotobuf/proto\"\n\t\"flag\"\n\t\"fmt\"\n\t\"github.com/rootsdev/fsbff/fs_data\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc check(err error) {\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n...
go
edit
0
3
mit
b8cbbf7ec1498d39a4da89b2c3ae40fdc4ed1467
rootsdev/fsbff
proto_dump/proto_dump.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage proof\n\nimport (\n\t\"hash\"\n\t\"io\"\n)\n\ntype Reader32 struct {\n\tr io.Reader\n\th hash.Hash32\n\tsum uint32\n}\n\nfunc NewReader32(r io.reader, h hash.Hash32, sum uint32) {\n\t// WIP\n}\n\nfunc (r *Reader32) Read(p []byte) (i...
go
edit
0
3
bsd-2-clause
7787b5648743176d98cc731f23b029498b87b0f7
arsatiki/proof
reader.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage z80\n\ntype MemoryAccessor interface {\n\tReadByte(address uint16) byte\n\tReadByteInternal(address uint16) byte\n\n\tWriteByte(address uint16, value byte)\n\tWriteByteInternal(address uint16, value byte)\n\n\tContendRead(address uint16...
go
edit
0
0
mit
0dd9084f03352e64ba509ee7a49bee2487e36122
remogatto/z80,remogatto/z80,remogatto/z80
memory.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage generator\n\nimport \"os\"\n\n// Generator is in charge of generating files for packages.\ntype Generator struct {\n\tfilename string\n}\n\n// NewGenerator creates a new generator that can save on the given filename.\nfunc NewGenerator(...
go
edit
9
2
mit
d603bea6e9869e749b7122112351e532196b8c5a
src-d/go-kallax
generator/generator.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"github.com/Symantec/Dominator/proto/imageserver\"\n)\n\nfunc (t *rpcType) AddImage(request imageserver.AddImageRequest,\n\treply *imageserver.AddImageResponse) error {\n\tif imageDataBase.C...
go
edit
12
5
apache-2.0
b69f32e9714b393f51e6a5a76da70dbc81d6dde0
keep94/Dominator,Symantec/Dominator,rgooch/Dominator,keep94/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator
imageserver/rpcd/addImage.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"image/color\"\n\n\t\"engo.io/ecs\"\n\t\"engo.io/engo/common\"\n)\n\ntype game struct{}\n\nfunc (g *game) Type() string { return sceneGame }\nfunc (g *game) Preload() {}\nfunc (g *game) Setup(*ecs.World) {\n\n\t...
go
edit
6
2
bsd-3-clause
0c1ba6f232dc2a250f68368035b5c529c8b38774
kori-irrlicht/jump-game
game.go
rejected_lint
Too many lint violations: 6
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
2
apache-2.0
53ac59756d5caba6b2e3cef392e462455d081d63
googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go,googleapis/google-cloud-go,michael-grosshans/google-cloud-go,michael-grosshans/google-cloud-go
bigtable/cmd/emulator/cbtemulator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Emir Pasic. 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\npackage utils\n\n// Comparator will make type assertion (see IntComparator for ...
go
edit
0
7
bsd-2-clause
320ab1bc739807472101aeb4a2b096b0411b4ec5
cagnosolutions/gods
utils/comparator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage instagram_scraper\n\nimport (\n\t\"net/http\"\n\t\"io/ioutil\"\n\t\"fmt\"\n\t\"encoding/json\"\n\t\"log\"\n)\n\nfunc GetAccoutByUsername(username string) (account Account) {\n\turl := fmt.Sprintf(ACCOUNT_JSON_INFO, username)\n\tinfo := ...
go
edit
15
5
apache-2.0
15d394c97784a74f9d6ab8cff883bfd2aea253dc
SolidlSnake/instagram-go-scraper
instagram-scraper/Instagram.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"github.com/ssandke/gomicbot/Godeps/_workspace/src/github.com/tucnak/telebot\"\n\ntype SayHiMessageConsumer struct {\n\tbot *telebot.Bot\n\tstore StateStore\n}\n\nfunc (c *SayHiMessageConsumer) Initialize(config *Confi...
go
edit
6
3
mit
328a01f9020475ef6eecc16ceda60d93e1ea64da
ssandke/gomicbot
cmd/gomicbot/SayHiMessageConsumer.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage slinga\n\nimport (\n\t\"fmt\"\n\t\"github.com/gosuri/uiprogress\"\n\t\"github.com/gosuri/uiprogress/util/strutil\"\n\t\"time\"\n)\n\nfunc NewProgress() *uiprogress.Progress {\n\tprogress := uiprogress.New()\n\tprogress.RefreshInterval =...
go
edit
0
1
apache-2.0
5b1f398a18dd24ddbc61b323b609decf90dec5ef
Aptomi/aptomi,Aptomi/aptomi,Aptomi/aptomi,Aptomi/aptomi
pkg/slinga/progress.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage humanlog\n\nimport (\n\t\"regexp\"\n)\n\n// dcLogsPrefixRe parses out a prefix like 'web_1 | ' from docker-compose\nvar dcLogsPrefixRe = regexp.MustCompile(\"^(?:\\x1b\\\\[\\\\d+m)?([a-zA-Z0-9._-]+)\\\\s+\\\\|(?:\\x1b\\\\[0m)? (.*)$\")\...
go
edit
0
3
apache-2.0
93d28d1f9bdbca83e2c443df1a1f77d2bdec0b9d
aybabtme/humanlog,aybabtme/humanlog
docker_compose_handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2021 The Vitess 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.org/...
go
edit
12
1
apache-2.0
66f0d14a2cbd4677de3ce1557715bda7b9c373d8
mahak/vitess,vitessio/vitess,mahak/vitess,mahak/vitess,tinyspeck/vitess,mahak/vitess,vitessio/vitess,vitessio/vitess,mahak/vitess,mahak/vitess,tinyspeck/vitess,vitessio/vitess,tinyspeck/vitess,vitessio/vitess,vitessio/vitess,vitessio/vitess,vitessio/vitess,mahak/vitess,tinyspeck/vitess,tinyspeck/vitess,tinyspeck/vitess...
go/vt/vtadmin/http/schemas.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pihole\n\ntype Service struct{}\n\nfunc (s Service) UserData() string {\n\treturn `\n - name: pihole-etc-host.service\n command: start\n content: |\n [Unit]\n Description=pihole /etc/hosts entry\n Condi...
go
edit
0
1
unlicense
7a7ebc43af079147cce39e14d1996a963663717f
dan-v/dosxvpn,dan-v/dosxvpn,dan-v/dosxvpn
services/pihole/pihole.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 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.org/l...
go
edit
0
0
apache-2.0
7bf6cd7d566ffc3d4073c350d82eeddbdc088880
kubernetes/sample-controller,kubernetes/sample-controller
pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
rejected_duplicate
Near-duplicate of sample 117037
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli_test\n\nimport (\n\t\"regexp\"\n\t\"testing\"\n)\n\nfunc TestCreate(t *testing.T) {\n\trun(t, []Command{\n\t\t{\n\t\t\t\"apps\",\n\t\t\t\"\",\n\t\t},\n\t\t{\n\t\t\t\"create acme-inc\",\n\t\t\t\"Created acme-inc.\",\n\t\t},\n\t})\n}\...
go
edit
9
1
bsd-2-clause
dfee04c65c347a31df04c63ffd1269964b96acfc
zofuthan/empire,vfulco/empire,markpeek/empire,zofuthan/empire,remind101/empire,iserko/empire,vfulco/empire,remind101/empire,mhahn/empire,mhahn/empire,remind101/empire,iserko/empire,mhahn/empire,markpeek/empire,iserko/empire
tests/cli/apps_test.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\"flag\"\n\t// \"fmt\"\n\t\"io/ioutil\"\n\t\"log\"\n\t\"runtime\"\n)\n\nfunc main() {\n\truntime.GOMAXPROCS(2)\n\tflag.Parse()\n\n\tif flag.NArg() != 1 {\n\t\tflag.Usage()\n\t\tlog.Fatalf(\"FILE: the .rb file to exec...
go
edit
18
6
mit
c6f6094b3e7dfc3f4c72fcf264377f23305b2a1a
brucehsu/GobiesVM,Ye-Yong-Chi/GobiesVM,brucehsu/GobiesVM,Ye-Yong-Chi/GobiesVM
src/main.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ghostinspector\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\n// APIV1Path is the protocol and base path of the Ghost Inspector API version 1\nconst APIV1Path = \"https://api.ghostinspector.com/v1\"\n...
go
edit
6
3
mit
cff7f677ac1f06c742caba8aadad6afcb5dfabd9
lukevers/ghostinspector
ghostinspector.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage utils\n\nfunc CheckError(e error) {\n if e != nil {\n panic(e)\n }\n}\n\n```\n\nApply this change: Add custom style to error reporting function\n\n* Along with the line number, it shows the column also.\n With a indicator ...
go
edit
0
2
mit
8bc33be84a326e08fdfd47a16a5b9179a8d58230
pravj/glox,pravj/glox
utils/utils.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cues\n\nimport (\n\t\"errors\"\n\t\"strings\"\n)\n\ntype CueTemplate struct {\n\tMapping map[string]int\n} //end CueTemplate\n\nfunc (tmpl CueTemplate) Create(headers []string) (CueTemplate, error) {\n\tvar err error\n\ttmpl.Mapping = m...
go
edit
0
10
mit
6acad02d47687ca3b388b480db5982888ab184f9
woz5999/CueDescriptionsToASCII,woz5999/CueDescriptionsToASCII,woz5999/CueDescriptionsToASCII
cues/cueTemplate.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage oidc\n\nimport \"github.com/skygeario/skygear-server/pkg/auth/dependency/urlprefix\"\n\ntype MetadataProvider struct {\n\tURLPrefix urlprefix.Provider\n\tJWKSEndpoint JWKSEndpointProvider\n\tUserInfoEndpoint UserInfoEndpointP...
go
edit
9
1
apache-2.0
76308a796ca11b4eacc063971d25fa40b5842907
SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server
pkg/auth/dependency/oidc/metadata.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage observers\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\n\t\"github.com/ivan1993spb/snake-server/world\"\n)\n\ntype LoggerObserver struct{}\n\nfunc (LoggerObserver) Observe(stop <-chan struct{}, w *world.World, logger logrus.FieldLogg...
go
edit
3
5
bsd-2-clause
0dd412a962419cf7e8be62d0b3254d907f5354e3
ivan1993spb/clever-snake
observers/logger_observer.go
rejected_duplicate
Near-duplicate of sample 117283
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\nfunc marshal(version interface{}) string {\n\tversionJSON, err := json.Marshal(version)\n\tif err != nil {\n\t\treturn fmt.Sprintf(\"error: '%v'\", err) // OK\n\t}\n\treturn version...
go
edit
6
2
mit
bcb9ce2498d52214ca4fde9bab8a6b415c350eff
github/codeql,github/codeql,github/codeql,github/codeql-go,github/codeql,github/codeql,github/codeql,github/codeql-go,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql-go,github/codeql-go,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
ql/test/query-tests/Security/CWE-089/tst.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nconst CcBuildArtifactsUploadUriKey = \"cc-build-artifacts-upload-uri\"\nconst CcDropletUploadUriKey = \"cc-droplet-upload-uri\"\n\n```\n\nApply this change: Add timeout key for file-server\n\n[#82415708]" }, { "role": ...
go
edit
0
0
apache-2.0
5d6e6dd0f52a5c0c1ddd57ada2c8f7f10b1cbf92
cloudfoundry-incubator/runtime-schema
models/cc_upload_staging_uri_key.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pgstorage\n\nimport (\n\t\"testing\"\n)\n\nfunc TestCollectionFieldToSelector(t *testing.T) {\n\ttests := []struct {\n\t\tInput []string\n\t\tOutput string\n\t}{\n\t\t{\n\t\t\tInput: []string{\"data\", \"a\", \"b\", \"innervalue\"},\n...
go
edit
6
4
mit
391b3d121f295646dbcf02ae46a401d68482b32e
jacksontj/dataman
src/storage_node/datasource/pgstore/util_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage randstr\n\nimport (\n\t\"crypto/rand\"\n\t\"io\"\n)\n\n// New generates a new random string of length given, using only the characters given in runes.\nfunc New(length int, runes []rune) string {\n\tpassword := make([]rune, length)\n\n\...
go
edit
0
3
mit
5bb2af6cf06bbb3affb8ee05a1b05d0719e29594
leighmcculloch/randstr
lib/randstr/randstr.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage httpimg_test\n\nimport (\n\t\"github.com/jung-kurt/gofpdf\"\n\t\"github.com/jung-kurt/gofpdf/contrib/httpimg\"\n\t\"github.com/jung-kurt/gofpdf/internal/example\"\n)\n\nfunc ExampleRegister() {\n\tpdf := gofpdf.New(\"\", \"\", \"\", \"\...
go
edit
0
1
mit
3a6634b2456fc0cd151e25cc90b3b6865bbb5332
jung-kurt/gofpdf,ledongthuc/gofpdf,jelmersnoeck/gofpdf,jelmersnoeck/gofpdf
contrib/httpimg/httpimg_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nctxdownload is a Golang package which provides helper functions for performing context-aware download task.\n\n*/\npackage ctxdownload\n\n```\n\nApply this change: Add 'Package' before description to remove golint warnings." }, { "r...
go
edit
0
0
mit
6b4c45929a3c4b71621b3e1c66b27a9eac52684d
northbright/ctx
ctxdownload/doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !windows,!plan9,!js\n\npackage eval\n\nimport (\n\t\"testing\"\n\n\t\"github.com/elves/elvish/pkg/tt\"\n)\n\nfunc TestExternalCmdExit_Error(t *testing.T) {\n\ttt.Test(t, tt.Fn(\"Error\", error.Error), tt.Table{\n\t\ttt.Args(ExternalCm...
go
edit
0
1
bsd-2-clause
4f26803226b227d95642f3344496770e6753a466
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
pkg/eval/exception_unix_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handler\n\nimport (\n\t\"github.com/mondough/phosphor/domain\"\n\t\"github.com/mondough/phosphor/proto\"\n)\n\nfunc prettyFormatTrace(t *domain.Trace) interface{} {\n\treturn map[string]interface{}{\n\t\t\"annotations\": formatAnnotatio...
go
edit
0
2
apache-2.0
7fed3eb489a409da0ff0fd96f2d28fad1716eec9
mondough/phosphor,mattheath/phosphor,mondough/phosphor,mattheath/phosphor
handler/marshaling.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\n\tlog \"github.com/Sirupsen/logrus\"\n\tlogx \"github.com/cerana/cerana/pkg/logrusx\"\n\t\"github.com/cerana/cerana/provider\"\n\t\"github.com/cerana/cerana/providers/systemd\"\n\tflag \"github.com/spf13/pf...
go
edit
0
2
mit
a023359610a37f58f2fec069911e4a1c2f1728a2
cerana/cerana,cerana/cerana,cerana/cerana,cerana/cerana
cmd/systemd-provider/main.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\t\"os/exec\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"github.com/squaremo/ambergreen/balancer\"\n\t\"github.com/squaremo/ambergreen/balancer/fatal\"\n)\n\nfunc iptables(args []string) ([]byte, error...
go
edit
0
4
apache-2.0
9bd714adb545abd5eaeb19c36a4d897fe4a9f41d
squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen
balancer/cmd/balancer/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main // import \"cirello.io/gochatbot\"\n\nimport (\n\t\"log\"\n\t\"os\"\n\n\t\"cirello.io/gochatbot/bot\"\n\t\"cirello.io/gochatbot/brain\"\n\t\"cirello.io/gochatbot/providers\"\n\t\"cirello.io/gochatbot/rules/cron\"\n\t\"cirello.io/go...
go
edit
0
4
mit
542d32aef0bbcc67401d088cfd93cb3d80e543bf
ccirello/gochatbot,ccirello/gochatbot,ccirello/gochatbot
gochatbot.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// (c) 2012 Alexander Solovyov\n// under terms of ISC license\n\npackage main\n\nimport (\n\t\"github.com/howeyc/fsnotify\"\n\t\"os\"\n\t\"path/filepath\"\n)\n\nfunc Watcher(config *SiteConfig) (chan string, error) {\n\twatcher, err := fsnotify...
go
edit
3
5
isc
25c380d93d7546713cd5af35558217faa674835b
holic/gostatic,sisteamnik/gostatic,beni55/gostatic,greyhwndz/gostatic,krpors/gostatic,greyhwndz/gostatic,piranha/gostatic,piranha/gostatic,sisteamnik/gostatic,zhuharev/gostatic,beni55/gostatic,krpors/gostatic,zhuharev/gostatic,holic/gostatic
watch.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2015-2019 Hilko Bengen <<EMAIL>>\n// All rights reserved.\n//\n// Use of this source code is governed by the license that can be\n// found in the LICENSE file.\n\npackage yara\n\n// #cgo !no_pkg_config,!yara_static pkg-config: y...
go
edit
2
0
bsd-2-clause
0a49f8cea2f456f254555f2eadc85a276280d4b1
VirusTotal/go-yara,hillu/go-yara,hillu/go-yara
cgo.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !gtk_3_6,!gtk_3_8\n\npackage gtk\n\n// #cgo pkg-config: gtk+-3.0\n// #include <gtk/gtk.h>\nimport \"C\"\nimport (\n\t\"unsafe\"\n)\n\n//export goListBoxFilterFuncs\nfunc goListBoxFilterFuncs(row *C.GtkListBoxRow, userData C.gpointer) ...
go
edit
15
1
isc
03674b95468a492d93d52e08e77c962d85ec531a
gotk3/gotk3,gotk3/gotk3
gtk/gtk_export_since_3_10.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage acceptance_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/onsi/gomega/gexec\"\n\n\t\"github.com/cloudfoundry-incubator/cf-test-helpers/cf\"\n\t\"github.com/cloudfoundry-incubator/cf-te...
go
edit
21
1
mit
512d3e5cc82c945a6b038e238a5c13ca26e0ce7e
alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf,alphagov/paas-cf
platform-tests/src/acceptance/python_buildpack_test.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage h2spec\n\nimport (\n\t\"github.com/bradfitz/http2\"\n\t\"io\"\n\t\"time\"\n)\n\nfunc TestErrorHandling(ctx *Context) {\n\tPrintHeader(\"5.4. Error Handling\", 0)\n\tTestConnectionErrorHandling(ctx)\n\tPrintFooter()\n}\n\nfunc TestConnec...
go
edit
24
9
mit
8caadfd07344b0327e36eace8e24c75ad588b75c
shane-kearns/h2spec,summerwind/h2spec,kazuho/h2spec,rmoorman/h2spec
5_4.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"os/signal\"\n\t\"syscall\"\n\n\t\"github.com/underlx/disturbancesmlx/discordbot\"\n)\n\n// DiscordBot starts the Discord bot if it is enabled in the settings\nfunc DiscordBot() {\n\tdiscordToken, present ...
go
edit
18
3
apache-2.0
81fe3fd8620c328ad0bf3bba0b95dafa620c66c0
gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx
discord.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage filesystem\n\nimport (\n\t\"log\"\n\t\"os/user\"\n\t\"path/filepath\"\n\t\"sync\"\n)\n\nfunc GetSymLinkURI(uri string) string {\n\n\tuserDir := GetUserDirURI()\n\n\t_, fileName := filepath.Split(uri)\n\tsymLinkUri := filepath.Join(userD...
go
edit
0
2
mit
d9502b072ef70f0463bd03f13a87ce24a76c5128
drpotato/dotdot
filesystem/uris.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage logsrvc\n\nimport (\n \"flag\"\n\t\"fmt\"\n\t\"testing\"\n)\n\nvar (\n logSrv string\n logger *Logger\n)\n\nfunc init() {\n flAddr := flag.String(\"a\", \"127.0.0.1:5988\", \"address of log server\")\n ...
go
edit
6
2
isc
cd50e761184347d5f78d04df46c29d7a4267090e
gokyle/kludge
logsrv/logsrvc/client_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage route\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n)\n\ntype matcher func(req *http.Request) ([]string, bool)\n\nvar (\n\tuuidSlug *regexp.Regexp\n\tanySlug *regexp.Regexp\n)\n\nfunc init() {\n\tuuidSlug = regexp.MustCompile(\...
go
edit
0
1
mit
64f0b206d05985900001783a2dcd637572ef9994
starkandwayne/shield,starkandwayne/shield,starkandwayne/shield,starkandwayne/shield,starkandwayne/shield
route/match.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/Symantec/Dominator/lib/srpc\"\n)\n\nfunc showImageSubcommand(args []string) {\n\timageSClient, _ := getClients()\n\tif err := showImage(imageSClient, args[0]); err != nil {\n\t\tfm...
go
edit
6
2
apache-2.0
33f9460667d9fde7c765459e4d003f0326793bc3
Symantec/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator
cmd/imagetool/showImage.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n)\n\nvar rootCmd = &cobra.Command{\n\tUse: \"polymerase\",\n\tShort: \"MySQL backup management API integreted with Percona Xtrabackup\",\n\tSilenceUsa...
go
edit
0
2
apache-2.0
624b5b9081477a5379751e93ae590c87d151d22a
taku-k/polymerase,taku-k/polymerase,taku-k/polymerase,taku-k/polymerase
pkg/cli/cli.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2015 Nodetemple <<EMAIL>>\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.org...
go
edit
0
0
apache-2.0
3cb9f5269864c823ed2919945d93ceee924a0097
nodetemple/nodetemple,nodetemple/nodetemple
common/common.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage codeutilsShared\n\nimport (\n\t\"crypto/sha512\"\n\t\"encoding/hex\"\n\t\"os\"\n)\n\nvar UniversalFileMode os.FileMode // Define universalFileMode as a file mode we'll wherever we can\n\nfunc init() {\n\tUniversalFileMode = 0744 // Only...
go
edit
0
1
apache-2.0
c9fb1a19b1428d65ecd7685871e583ec09855e98
StroblIndustries/codeutilsShared,StroblIndustries/coreutils
codeutilsShared.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/bradleyfalzon/revgrep\"\n)\n\nfunc main() {\n\tfmt.Println(\"Starting...\")\n\n\t// Get lines changes\n\trevgrep.Changes(nil, os.Stdin, os.Stderr)\n\n\t// Open stdin and scan\n\n\t...
go
edit
0
1
apache-2.0
670a45ef99fbbd3e56453892460cdef4f2df5880
bradleyfalzon/revgrep,bradleyfalzon/revgrep
cmd/revgrep/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ec2\n\nimport (\n\t\"github.com/jagregory/cfval/constraints\"\n\t\"github.com/jagregory/cfval/resources/common\"\n\t. \"github.com/jagregory/cfval/schema\"\n)\n\n// see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-...
go
edit
24
0
mit
4e011639cff399e31306ea96ec2ece164f65f3ef
jagregory/cfval,jagregory/cfval
resources/ec2/route_table.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ambition\n\nimport (\n\t\"github.com/julienschmidt/httprouter\"\n)\n\n// Add routes to http router\n// TODO: Add route description parameters and useage\nfunc AddRoutes(router *httprouter.Router) {\n\trouter.GET(\"/actions\", CheckAuth(...
go
edit
18
1
unlicense
1c83c0c38d01657f834c86b4bf231d5e62ed8c13
lelandbatey/ambition,lelandbatey/ambition,lelandbatey/ambition
routes.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\"fmt\"\n\tworker \"github.com/contribsys/faktory_worker_go\"\n)\n\nfunc someFunc(ctx worker.Context, args ...interface{}) error {\n\tfmt.Println(\"Working on job\", ctx.Jid())\n\treturn nil\n}\n\nfunc main() {\n\tmg...
go
edit
0
2
apache-2.0
1a29bf40529447241639f7ec40b2a7436332afcd
kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi
worker/main.go
rejected_duplicate
Near-duplicate of sample 119083
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*-\n * Copyright (c) 2016, 1&1 Internet SE\n * All rights reserved\n */\n\npackage stmt\n\nconst LoadPermissions = `\nSELECT permission_id,\n permission_name\nFROM soma.permissions;`\n\n// vim: ts=4 sw=4 sts=4 noet fenc=utf-8 ffs=unix\...
go
edit
0
0
bsd-2-clause
697c3eb341b1d415b82038e0ec7a8c9d493b079f
1and1/soma
lib/stmt/supervisor_permission.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage octokat\n\nimport (\n\t\"github.com/bmizerany/assert\"\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestRepositories(t *testing.T) {\n\tc := NewClient().WithToken(os.Getenv(\"GITHUB_TOKEN\"))\n\trepo := Repo{\"octokat\", \"jingweno\"}\n\n\trepos...
go
edit
0
1
mit
f2d2ed1a58e630a78c7dfcc7776fee539575bdf5
crosbymichael/octokat,octokit/go-octokit,pcasaretto/go-octokit,pcasaretto/go-octokit,SvenDowideit/octokat,half-ogre/go-octokit,calavera/go-octokit,octokit/go-octokit,half-ogre/go-octokit,calavera/go-octokit
repositories_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage feedloggr2\n\nimport (\n\t\"github.com/jinzhu/gorm\"\n\trss \"github.com/jteeuwen/go-pkg-rss\"\n\t_ \"github.com/mattn/go-sqlite3\"\n)\n\ntype Datastore interface {\n\tGetItems(feed_url string) ([]*FeedItem, error)\n\n\tProcessChannels(...
go
edit
18
2
mit
ce12ad94881781e489a823239a80ddbe96c94b39
lmas/feedloggr2
src/db.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage txsub\n\nimport (\n\t\"github.com/stellar/go-stellar-base/build\"\n\t\"github.com/stellar/go-stellar-base/strkey\"\n\t\"github.com/stellar/go-stellar-base/xdr\"\n\t\"golang.org/x/net/context\"\n)\n\ntype envelopeInfo struct {\n\tHash ...
go
edit
3
3
apache-2.0
2687cbc798235d97f51db8e62439171e6712be59
nullstyle/go-horizon,masonforest/horizon,irisli/horizon,masonforest/horizon,stellar/horizon,nullstyle/go-horizon,irisli/horizon,stellar/horizon,stellar/horizon,masonforest/horizon,masonforest/go-horizon,irisli/horizon,masonforest/go-horizon,masonforest/go-horizon,nullstyle/go-horizon
src/github.com/stellar/horizon/txsub/internal.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage actions\n\nfunc (as *ActionSuite) Test_HomeHandler() {\n\tres := as.JSON(\"/\").Get()\n\tas.Equal(200, res.Code)\n\tas.Contains(res.Body.String(), \"Welcome to HavenGRC\")\n}\n\n```\n\nApply this change: Fix havenapi test to use healthz...
go
edit
3
1
apache-2.0
a62d9813fa33f7156b6fa11566aa697f7b275756
kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi,kindlyops/mappamundi
havenapi/actions/home_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common_test\n\nimport (\n\t\"testing\"\n\n\t\"github.com/graph-gophers/graphql-go/internal/common\"\n)\n\ntype consumeTestCase struct {\n\tdescription string\n\tdefinition string\n\texpected string // expected description\n}\n\nvar ...
go
edit
0
3
bsd-2-clause
ce762577cbd55b7431607a3031cd4a9a1460248f
graph-gophers/graphql-go,graph-gophers/graphql-go,neelance/graphql-go,chris-ramon/graphql-go,graph-gophers/graphql-go,neelance/graphql-go
internal/common/lexer_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n)\n\nvar (\n\tlisten = flag.String(\"listen\", \":8053\", \"set the listener address\")\n\tflaglog = flag.Bool(\"log\", false, \"be more verbose\")\n\tflagrun = flag.B...
go
edit
9
2
apache-2.0
db25a136ea869458dba25f36cf2c650114a5170b
abligh/geodns,anuaimi/geodns,gofort/geodns,abh/geodns,abligh/geodns,anuaimi/geodns,abh/geodns,anuaimi/geodns,abligh/geodns,gofort/geodns,gofort/geodns
geodns.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cloudwatch\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/Pallinder/go-randomdata\"\n\t\"github.com/gliderlabs/logspout/router\"\n)\n\nconst NumMessages = 25000000\n\nfunc TestCloudWatchAdapter(t *testing.T) {\n\tif testing.Sh...
go
edit
9
4
mit
65c37623ae654d0c362d57f6cbecd5e955ba198c
bradgignac/logspout-cloudwatch,bradgignac/logspout-cloudwatch
cloudwatch_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage all\n\nimport (\n\t_ \"github.com/influxdb/tivan/plugins/redis\"\n\t_ \"github.com/influxdb/tivan/plugins/system\"\n)\n\n```\n\nApply this change: Enable pg and mysql by default" }, { "role": "assistant", "content": "package...
go
edit
0
0
mit
bcb33d880e0f2e35bdae3855c3964892737f2f17
pugna0/telegraf,szibis/telegraf,ekini/telegraf,ndegory/telegraf,nevins-b/telegraf,netixen/telegraf,RasmusWernerLarsen/telegraf,Maksadbek/telegraf,aurrelhebert/telegraf,marianob85/telegraf,tanji/telegraf,codehate/telegraf,realgo/telegraf,james-lawrence/telegraf,nevins-b/telegraf,Brightspace/telegraf,Mic92/telegraf,subfx...
plugins/all/all.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nPackage ghostinspector provides a basic API wrapper around the Ghost Inspector\nAPI.\n\nUsage:\n\n\timport \"github.com/lukevers/ghostinspector\"\n\nConstruct a new `GhostInspector` client. You will need an API key, which you\ncan get from ...
go
edit
0
0
mit
b59c260d4a4c7d6d1d39c0d7347dcab090edc70f
lukevers/ghostinspector
doc.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stressql\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n)\n\n// Pulls the default configFile and makes sure it parses\nfunc TestParseStatements(t *testing.T) {\n\tgopath := os.Getenv(\"GOPATH\")\n\tif gopath == \"\" {\n\t\tt.Error(\"$...
go
edit
3
3
mit
04c72a2c07cbbe2d51ed6d9f5a6478c27f2ec5f5
daachi/influxdb,pkittenis/influxdb,jgeiger/influxdb,mnuessler/influxdb,joaopedrotaveira/influxdb,otoolep/influxdb,arussellsaw/influxdb,mark-rushakoff/influxdb,jgeiger/influxdb,arussellsaw/influxdb,linearb/influxdb,joaopedrotaveira/influxdb,nooproblem/influxdb,apigee/influxdb,chenziliang/influxdb,daachi/influxdb,otoolep...
stress/v2/stressql/parser_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/jinzhu/gorm\"\n)\n\n// Class is the metadata of the node\ntype Class struct {\n\tgorm.Model\n\tName string //The name of NodeType\n\tBase string //Base type name\n\tOp...
go
edit
21
1
apache-2.0
6d7d062f7ec8bc007d14d45c6ce8e9d4584c6c18
ChaosXu/nerv,ChaosXu/nerv,ChaosXu/nerv,ChaosXu/nerv,ChaosXu/nerv
lib/model/class.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"os\"\n)\n\n// shamelessly snagged from the go tool\n// each command gets its own set of args,\n// defines its own entry point, and provides its own help\ntype Command struct {\n\tRun func(cmd *Command,...
go
edit
3
1
mit
55a3925a44d8f7d85ed43ec2bfd9aadf7a1f1aac
letsencrypt/goose,C18/goose,evenco/go-goose,CloudCom/goose,draaglom/goose,c2h5oh/goose,ox/goose,steinbacher/goose,simonz05/goose,rubenv/goose,TobiasBales/goose,gleez/goose,mizukusak/goose,motain/goose,resonancelabs/goose,jnfeinstein/goose,snikch/goose,digitallumens/goose,Vektah/goose,robert-chiniquy/goose,kevinburke/go...
cmd.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage messaging\n\nimport (\n\t\"context\"\n\t\"time\"\n)\n\ntype Event struct {\n\tId string\n\tAction string\n\tTimestamp time.Time\n\tBody []byte\n\tctx context.Context\n}\n\n// WithContext returns a shallow copy of Ev...
go
edit
0
2
mit
5c35287b6f8b26472249752461ab749cc6425231
skrater/goevents,eventials/goevents
messaging/event.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\ntype strFlag struct {\n\t*string\n}\n\nfunc (f *strFlag) Set(s string) error {\n\tf.string = &s\n\treturn nil\n}\n\nfunc (f *strFlag) String() string {\n\tif f.string != nil {\n\t\treturn *f.string\n\t}\n\treturn \"\"\n}\n\n\n```\n\nApply this ...
go
edit
0
2
mit
0ab6c806cab3423fd8172bbe73f35b2e1c9832f6
ricardobranco777/xhash
strflag.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mongo\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/rs/rest-layer/schema\"\n\t\"gopkg.in/mgo.v2/bson\"\n)\n\nvar (\n\t// NewObjectID is a field hook handler that generates a new Mongo ObjectID ...
go
edit
0
0
mit
941862c53fd5a49966827ed2515c75254e6d823a
rs/rest-layer-mongo,omani/rest-layer-mongo
id.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"net\"\n)\n\nconst PORT = \"2525\"\n\nfunc main() {\n\tserver := createServer(PORT)\n\n\tdefer server.Close()\n\n\tfor {\n\t\tconn, err := server.Accept()\n\n\t\tif err != nil {\n\t\t\tlog.Fatalf(\"Error ...
go
edit
6
3
mit
0343d4f2d9bdd84376753ec759fe27663404058a
frodsan/mat
mt.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage lifecycle\n\nimport (\n\t\"github.com/lxc/lxd/shared/api\"\n\t\"github.com/lxc/lxd/shared/version\"\n)\n\n// StoragePoolAction represents a lifecycle event action for storage pools.\ntype StoragePoolAction string\n\n// All supported lif...
go
edit
0
1
apache-2.0
f5b2b31b414b2b468a72dbffbf583d94d114e4e0
stgraber/lxd,hallyn/lxd,hallyn/lxd,lxc/lxd,stgraber/lxd,hallyn/lxd,lxc/lxd,hallyn/lxd,stgraber/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,stgraber/lxd,lxc/lxd,stgraber/lxd,lxc/lxd,hallyn/lxd,lxc/lxd,lxc/lxd,hallyn/lxd
lxd/lifecycle/storage_pool.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage log\n\nimport (\n\t\"bytes\"\n\t\"log\"\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"regexp\"\n\t\"testing\"\n)\n\nfunc TestCommonLogHandler(t *testing.T) {\n\th := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tw...
go
edit
3
3
mit
7979fcfe42377c37b156869b8d5241b7e3387415
99designs/goodies
http/log/log_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage project\n\nimport (\n\t\"fmt\"\n\n\t\"golang.org/x/net/context\"\n\n\t\"github.com/docker/libcompose/project/events\"\n)\n\n// Containers lists the containers for the specified services. Can be filter using\n// the Filter struct.\nfunc ...
go
edit
18
8
apache-2.0
6dcb4a443c4e75c28b02b869f50b1f21db7e0def
dweomer/docker-libcompose,Azure22/libcompose,docker/libcompose,vdemeester/libcompose,dweomer/docker-libcompose,docker/libcompose,Azure22/libcompose,vdemeester/libcompose
project/project_containers.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage roxanne\n\nimport (\n \"net\"\n \"fmt\"\n \"bufio\"\n \"strings\"\n)\n\ntype Response map[string]string\n\ntype Client struct {\n c net.Conn\n response Response\n}\n\nfunc (r *Client) Connect(HostPort string) (e error) {\n r.resp...
go
edit
0
2
mit
0c931a09e517270a497690e756478a92ece9cb58
rothrock/roxanne-client-go
client.go
accepted
null
true