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 api\n\nimport (\n\t\"encoding/json\"\n\t\"testing\"\n\n\t\"github.com/keydotcat/server/util\"\n)\n\nfunc TestGetFullVersion(t *testing.T) {\n\tr, err := GetRequest(\"/version\")\n\tCheckErrorAndResponse(t, r, err, 200)\n\tsga := &versio...
go
edit
9
4
mit
06524d01fded9e57a05164ac9db285cccca72c58
keydotcat/backend
api/version_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage octokit\n\nconst (\n\tgitHubAPIURL = \"https://api.github.com\"\n\tuserAgent = \"Octokit Go \" + version\n\tversion = \"0.3.0\"\n\tdefaultMediaType = \"application/vnd.github.v3+json\"\n)\n\n```\n\nApply this change:...
go
edit
0
0
mit
9064c9bd0b7c21c9d4443c2dc3f283516b43e210
pcasaretto/go-octokit,pcasaretto/go-octokit,half-ogre/go-octokit,octokit/go-octokit,calavera/go-octokit,octokit/go-octokit,half-ogre/go-octokit,calavera/go-octokit
octokit/octokit.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/0xAX/notificator\"\n\t\"github.com/datawire/teleproxy/pkg/supervisor\"\n)\n\nvar notifyConfig *notificator.Notificator\n\n// Notify displays a desktop banner notification to the user\nfunc N...
go
edit
0
5
apache-2.0
e2ab8c7392c35e30a1f04a5303e909f1d296667a
datawire/ambassador,datawire/telepresence,datawire/telepresence,datawire/ambassador,datawire/ambassador,datawire/telepresence,datawire/ambassador,datawire/ambassador
cmd/playpen/notify.go
accepted
null
true
[ { "role": "user", "content": "Write go code for the following: Make the whole project compilable" }, { "role": "assistant", "content": "// Copyright 2013 Andreas Koch. 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...
go
new_file
0
1
bsd-3-clause
b1716db73f4526ee0e835610523c47830a2ef364
andreaskoch/allmark
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\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/linuxkit/linuxkit/src/cmd/linuxkit/pkglib\"\n)\n\nfunc pkgBuild(args []string) {\n\tflags := flag.NewFlagSet(\"pkg build\", flag.ExitOnError)\n\tfl...
go
edit
0
4
apache-2.0
9d2e7e9281e270ca62b17f1d77fd1668ae2266e4
konstruktoid/linuxkit,djs55/linuxkit,linuxkit/linuxkit,JohnnyLeone/linuxkit,deitch/linuxkit,linuxkit/linuxkit,djs55/linuxkit,justincormack/linuxkit,linuxkit/linuxkit,furious-luke/linuxkit,justincormack/linuxkit,deitch/linuxkit,rn/linuxkit,JohnnyLeone/linuxkit,rn/linuxkit,konstruktoid/linuxkit,furious-luke/linuxkit,furi...
src/cmd/linuxkit/pkg_build.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// HTTP parts pre go1.7\n\n//+build !go1.7\n\npackage fs\n\nimport (\n\t\"net\"\n\t\"net/http\"\n)\n\n// dial with timeouts\nfunc (ci *ConfigInfo) dialTimeout(network, address string) (net.Conn, error) {\n\tdialer := ci.NewDialer()\n\tc, err :=...
go
edit
9
2
mit
c3d6cc91ec94de553c65dd3d3358fb9e9c31e80d
olihey/rclone,B4dM4n/rclone,ncw/rclone,seuffert/rclone,olihey/rclone,yonjah/rclone,yonjah/rclone,yonjah/rclone,ncw/rclone,seuffert/rclone,ncw/rclone,yonjah/rclone,seuffert/rclone,olihey/rclone,B4dM4n/rclone,olihey/rclone,ncw/rclone,seuffert/rclone,B4dM4n/rclone,B4dM4n/rclone
fs/http_old.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/peterhellberg/sseclient\"\n\t\"log\"\n\t\"os\"\n)\n\nvar logger *log.Logger\nvar urlFormat, deviceId string\n\nfunc init() {\n\tlogger = log.New(os.Stdout, \"\", log.LstdFlags|log.Lmicrosecond...
go
edit
0
4
mit
e8d4b40fca8d193e2758626c02d5e48cc4b6335f
jhitze/oak_weather_recorder
OakWeatherRecorder.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage s3_test\n\nimport (\n\t\"fmt\"\n\t\"github.com/kr/s3\"\n\t\"log\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n)\n\nfunc ExampleSign() {\n\tkeys := s3.Keys{\n\t\tos.Getenv(\"S3_ACCESS_KEY\"),\n\t\tos.Getenv(\"S3_SECRET_KEY\"),\...
go
edit
0
2
mit
d15cf7ab287e896507bfc36ebf4acb8ca5728518
fastly/s3,yannk/s3,jbenet/s3,kr/s3,500px/s3,retailnext/s3,matope/s3
example_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"regexp\"\n)\n\nfunc revers(ip4 string) {\n\tregE := regexp.MustCompile(\"[-a-z0-9]*\")\n\tHostname, err := net.LookupAddr(ip4)\n\tif err == nil {\n\t\tfmt.Printf(\"%s\\n\", regE.FindString(Hos...
go
edit
0
5
mit
f457e3573d1339c208d1bead73157f157f0a5dcc
gauthierc/go-utils
hostnameDNS.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n)\n\nvar cmdMigrate = &Command{\n\tRun: runMigrate,\n\tUsageLine: \"migrate\",\n\tShort: \"Regenerate data file\",\n\tLong: `Regenerate data file with new key file.`,\n}\n\n// Mi...
go
edit
24
8
mit
4e36046c3a38830152a7e29ad855f69a6a7bacc4
pinzolo/spwd
cmd_migrate.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage configuration\n\nimport (\n\t\"flag\"\n\t\"time\"\n)\n\n// parseConfigFlags overwrites configuration with set flags\nfunc parseConfigFlags(Conf *SplendidConfig) (*SplendidConfig, error) {\n\t// TODO: This should only happen if the flag ...
go
edit
3
1
mit
7f956da3f46268dc33006bb3222f8cf1213d2e84
slarti5191/splendid,slarti5191/splendid
configuration/config_flags.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage somaproto\n\ntype Oncall struct {\n\tId string `json:\"id, omitempty\"`\n\tName string `json:\"name, omitempty\"`\n\tNumber string `json:\"number, omitempty\"`\n\tDetails *OncallDetails `json:\"details, ...
go
edit
3
4
bsd-2-clause
5d529e84777b5ed00926f6f9fef1d11727780a57
1and1/soma
oncall.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n)\n\nfunc init() {\n\tflag.IntVar(&API_PORT, \"port\", 10777, \"api port\")\n\tflag.StringVar(&CONFIG_FILE, \"conf\", \"./service.conf\", \"config file\")\n\tflag.StringVar(&DATASTORE_DIR, \"datastore\", \"...
go
edit
9
1
mit
d9ab6e7f5257fd596ae91ad0d83b9bec8b0c9dda
DieterReuter/go-webservice
init.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\"math/rand\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/erbridge/gotwit\"\n\t\"github.com/erbridge/gotwit/twitter\"\n\t\"github.com/erbridge/wikipaedian/wiki\"\n)\n\nfunc main() {\n\tvar (\n\t\tcon twitter.C...
go
edit
0
4
mit
eac0ab520e2f49ac76a92c3b3e072756008a077c
erbridge/wikipaedian
main.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\"os\"\n\t\"strconv\"\n\n\t\"github.com/yuya-takeyama/argf\"\n)\n\nvar (\n\tname = \"ncat\"\n\tusage = fmt.Sprintf(\"usage: %s N [FILE]...\", name)\n)\n\nfunc printErr(err error) {\n\tfmt...
go
edit
0
9
mit
be0c92731d6a50b1187dfb7e33b88a6953f94fab
kusabashira/catn
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\t\"log\"\n\n\t_ \"github.com/lib/pq\"\n\t// To use the pgx driver, import this instead of pq. You'll also have to\n\t// change the driverName param of sql.Open from \"postgres\" to \"pgx...
go
edit
9
2
unlicense
f149cc47cd101af1524d46cdadf2e0614026b080
eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog,eliben/code-for-blog
2021/go-postgresql/pq/main.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2016 The Fission 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
0
2
apache-2.0
4d75c3fa4eea1087574072efa9edadb3c3daa390
fission/fission,ktrance/fission,fission/fission,platform9/fission,life1347/fission,life1347/fission,ktrance/fission,fission/fission,life1347/fission,life1347/fission,life1347/fission,ktrance/fission,platform9/fission,life1347/fission,platform9/fission,fission/fission,life1347/fission,life1347/fission,ktrance/fission,li...
common.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"gnd.la/app\"\n\t\"gnd.la/apps/docs\"\n\t\"gnd.la/apps/docs/doc\"\n\t\"gnd.la/net/urlutil\"\n\t\"path\"\n)\n\nconst (\n\t//gondolaURL = \"http://www.gondolaweb.com\"\n\tgondolaURL = \"ssh://abra.rm-fr.net/home/fiam/...
go
edit
0
4
apache-2.0
1dc40a4ba39737f7f2b1fbdb71395f7a7b98ed4c
rainycape/gondolaweb,rainycape/gondolaweb,rainycape/gondolaweb,rainycape/gondolaweb
web.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\"os\"\n)\n\ntype Config struct {\n\textractAddress string\n\tentitiesPath string\n\tlogPath string\n}\n\nfunc NewConfig() *Config {\n\tcfg := new(Config)\n\n\tcfg.extractAddress = get...
go
edit
0
2
mit
df0959217e3cbbceb4ea3ceef5dfd44ff0b813c8
alphagov/entity-extractor,alphagov/entity-extractor,alphagov/entity-extractor
config.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/git-time-metric/gtm/command\"\n\t\"github.com/git-time-metric/gtm/project\"\n\n\t\"github.com/mitchellh/cli\"\n)\n\nfunc main() {\n\tc := cli.NewCLI(\"gtm\", \"1.0.0\")\n\tc.Args =...
go
edit
0
3
mit
ea967ce31e46ab8a3b2414d950c14159f1570df1
git-time-metric/gtm,git-time-metric/gtm
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/tinycedar/lily/core\"\n\t\"github.com/tinycedar/lily/gui\"\n)\n\nfunc main() {\n\t// go core.OpenRegistry()\n\tgo core.FireHostsSwitch()\n\tgui.InitMainWindow()\n}\n\n```\n\nApply this change: misc: Add ...
go
edit
0
3
mit
fabb67e807d9b3276c51370bdef2697c244e0b19
tinycedar/lily
main.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
e6876d1cec554d2a7e9238725555d694b534eeee
alban/scope,kinvolk/scope,paulbellamy/scope,weaveworks/scope,kinvolk/scope,paulbellamy/scope,alban/scope,weaveworks/scope,kinvolk/scope,alban/scope,weaveworks/scope,paulbellamy/scope,alban/scope,kinvolk/scope,weaveworks/scope,paulbellamy/scope,alban/scope,paulbellamy/scope,kinvolk/scope,alban/scope,weaveworks/scope,wea...
cmd/wcloud/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2020 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
0
0
apache-2.0
c3fb79c44f6d45413075c1629ae94a7272a7f857
mahak/vitess,tinyspeck/vitess,mahak/vitess,tinyspeck/vitess,tinyspeck/vitess,mahak/vitess,mahak/vitess,mahak/vitess,mahak/vitess,tinyspeck/vitess,vitessio/vitess,mahak/vitess,vitessio/vitess,vitessio/vitess,vitessio/vitess,vitessio/vitess,vitessio/vitess,mahak/vitess,tinyspeck/vitess,vitessio/vitess,tinyspeck/vitess,vi...
go/cmd/vtctldclient/plugin_grpcvtctlclient.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Output differs every time it runs.\n/*\npackage tsdfs\n\nimport (\n\t\"testing\"\n\n\t\"github.com/gyuho/goraph/graph/gs\"\n)\n\nfunc TestTSDFS(t *testing.T) {\n\tg6 := gs.FromJSON(\"../../files/testgraph.json\", \"testgraph.006\")\n\tg6s :=...
go
edit
0
1
mit
737fa28b62919fb295c38a409d40c0243a3b6478
gale320/goraph,gyuho/goraph,gyuho/goraph,hsavit1/goraph
algorithm/tsdfs/tsdfs_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/boltdb/bolt\"\n\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = BeforeSuite(func() {\n\tconfig = Config{}\n\n\tconfig.Database.Path = \"test.sqlit...
go
edit
45
1
mit
ccbb9da9503e36853772d93202096157df119690
DarthSim/logbook,DarthSim/logbook,DarthSim/logbook
src/logbook_suite_test.go
rejected_lint
Too many lint violations: 45
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage metadata\n\ntype Machine struct {\n\tName string `yaml: \"name\"`\n\tInterfaces []Interface `yaml: \"interfaces,omitempty\"`\n}\n\ntype Interface struct {\n\tName string `yaml: \"name\"`\n\tIp string `yaml: \"ip\"`\n}\n\nty...
go
edit
0
0
apache-2.0
33e9be254750f2137894f98d51ceb5ee505b6e61
bernardolins/vandame,bernardolins/vandame
metadata/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage plugin\n\nimport \"os\"\n\n/**\n\t* This function is called by the plugin to setup their server. This allows us to call Run on the plugin\n\t* os.Args[1] port CF_CLI rpc server is running on\n\t* os.Args[2] **OPTIONAL**\n\t\t* SendMetad...
go
edit
6
2
apache-2.0
104740c9552270adc635b0447757204a17120b23
18F/cli,xingzhou/cli,rastasheep/trash-can,cgvarela/cli,pishro-cc/cli,saravana76/cli,EngineerBetter/cli,zhang-hua/cli,carnell69/cli,xingzhou/cli,saravana76/cli,hyenaspots/cli,SrinivasChilveri/cli,mcintyred/cli,EngineerBetter/cli,TomG713/cli,carnell69/cli,zhang-hua/cli,mcowger/cli,ofer43211/cli,zhang-hua/cli,fujitsu-cf/c...
plugin/plugin_shim.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestGetOrCreateServiceShouldCreateService(t *testing.T) {\n\tservice, err := GetOrCreateService(db, \"lebron-james\")\n\tassert.Nil(t, err)\n\tasser...
go
edit
21
1
mit
0e90d07bc3d2c83b1335389c0c7c8e0ea01c277f
hoop33/limo
model/service_test.go
rejected_lint
Too many lint violations: 21
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\"net/http\"\n)\n\nvar (\n\tdefaults *config\n\t//decoder = schema.NewDecoder()\n)\n\nfunc start(conf *config) {\n\tdefaults = conf\n\tflag.Set(\"bind\", conf.Address) // ...
go
edit
18
1
mit
551e78378a102535fea924ec9a08b865e01aef20
LapisBlue/Lapitar,LapisBlue/Lapitar,LapisBlue/Lapitar
server/http.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) Alex Ellis 2017. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n// Package requests package provides a client SDK or library for\n// the OpenFaaS g...
go
edit
0
0
mit
1cc93860d474b40efd9217631116f498b6ee5103
alexellis/faas,alexellis/faas,rgee0/faas,rgee0/faas,rgee0/faas,rgee0/faas,openfaas/faas,alexellis/faas,rgee0/faas,rgee0/faas,rgee0/faas,alexellis/faas,rgee0/faas,alexellis/faas,alexellis/faas,rgee0/faas,alexellis/faas,rgee0/faas,openfaas/faas,alexellis/faas,openfaas/faas,alexellis/faas
gateway/requests/requests.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage diff\n\nimport (\n\t\"fmt\"\n\t\"path/filepath\"\n\n\t\"github.com/xchapter7x/enaml/pull\"\n)\n\n// Result is returned from a diff operation\ntype Result struct {\n\tDeltas []string\n}\n\n// Differ implements diffing BOSH or Pivnet rele...
go
edit
12
3
apache-2.0
86cf78e9113bdca26f1e5dd6be32e968a92d58c5
enaml-ops/enaml,xchapter7x/enaml
diff/differ.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\"fmt\"\n\t\"strings\"\n\n\t\"github.com/remind101/empire/cli/pkg/plugin\"\n)\n\nvar pluginDeploy = plugin.Plugin{\n\tName: \"deploy\",\n\tAction: runDeploy,\n}\n\ntype Image struct {\n\tRepo string `json:\"repo\"`...
go
edit
0
3
bsd-2-clause
e2d59565e612d7d40732c33a7461770169dd6a04
vfulco/empire,zhakui/empire,remind101/empire,markpeek/empire,remind101/empire,remind101/empire,zhakui/empire,zofuthan/empire,vfulco/empire,lihuanghai/empire,mhahn/empire,no2key/empire,iserko/empire,mhahn/empire,zofuthan/empire,markpeek/empire,lihuanghai/empire,mhahn/empire,iserko/empire,iserko/empire,no2key/empire
cli/cmd/empire/deploy.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\"os\"\n\n\t\"github.com/fatih/color\"\n)\n\nfunc main() {\n\tconfigurationType := flag.String(\"type\", \"deployment\", \"Kubernetes configuration type, eg: deployment, rc, secret\")\n\timage ...
go
edit
0
4
mit
f8015cf6a636ac30e8dca27c9a9c5e2a3f2d5016
oshalygin/k8s-config,oshalygin/k8s-config
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage whois\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/domainr/whoistest\"\n\t\"github.com/nbio/st\"\n)\n\nfunc TestReadMIME(t *testing.T) {\n\tfns, err := whoistest.ResponseFiles()\n\tst.Assert(t, err, nil)\n\tfor _, f...
go
edit
9
2
mit
75af16f4b2c1e2f20ed6d215694311a9295ebc83
domainr/whois
response_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage activity\n\nimport (\n\t\"reflect\"\n\t\"time\"\n\n\t\"github.com/tolexo/aero/activity/model\"\n\t\"github.com/tolexo/aero/db/tmongo\"\n\tmgo \"gopkg.in/mgo.v2\"\n)\n\nconst (\n\tDB_CONTAINER = \"database.omni\"\n)\n\n//Log User activit...
go
edit
0
2
mit
0d1ac2a416d4a9b3a0f86b527a0ae9488115e21b
tolexo/aero
activity/activity.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\t\"fmt\"\n)\n\ntype squareTest struct {\n\tin, out int\n}\n\nvar squareTests = []squareTest{\n\tsquareTest{1, 1},\n\tsquareTest{2, 4},\n\tsquareTest{5, 25},\n\tsquareTest{-2, 4},\n}\n\n// テスト.\nfunc Tes...
go
edit
9
3
mit
5d73d9bbce416c46c6d9ebdf8491e2f0e69c2236
yoheiMune/MyGoProject,yoheiMune/MyGoProject
testtest/main_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage repository\n\nimport (\n\t\"github.com/mgierok/monujo/db\"\n\t\"github.com/mgierok/monujo/repository/entity\"\n)\n\nfunc PortfoliosExt() (entity.PortfoliosExt, error) {\n\tportfolios := entity.PortfoliosExt{}\n\terr := db.Connection().S...
go
edit
0
1
apache-2.0
16b353ce4ff8cab3447b428c6918554bc2917f5b
mgierok/monujo,mgierok/monujo
repository/portfolios.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/sivel/overseer/config\"\n\t\"github.com/sivel/overseer/runner\"\n)\n\nfunc main() {\n\tmonitors, notifiers := config.ParseConfig()\n\trun := runner.NewRunner(monitors, notifiers)\n\trun.Loop()\n}\n\n```\...
go
edit
0
1
apache-2.0
d2830824ec84732330f30c5eac19e6062dd36ae6
sivel/overseer
command.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage shell\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/kardianos/osext\"\n)\n\nconst template = `#!/usr/bin/env zsh\nANTIBODY_BINARY=\"%s\"\nantibody() {\n\tcase \"$1\" in\n\tbundle|update)\n\t\twhile read -u 3 bundle; do\n\t\t\ttouch /tmp/anti...
go
edit
0
1
mit
aae7d0beac11cc3f583d9ec194708c7957d53896
twang817/antibody,twang817/antibody,caarlos0/antibody,caarlos0/antibody,getantibody/antibody,getantibody/antibody
shell/init.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage myaws\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/aws/aws-sdk-go/service/sts\"\n\t\"github.com/pkg/errors\"\n)\n\n// STSID gets caller identity.\nfunc (client *Client) STSID() error {\n\tresponse, err := client.STS.GetCallerIdentity(&sts.G...
go
edit
3
2
mit
126c1c304a728016bd85301913d6b1c0a69a04a9
minamijoyo/myaws
myaws/sts_id.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage actions\n\nimport (\n\t\"fmt\"\n\t\"github.com/bronzdoc/skeletor/template\"\n\t\"log\"\n\t\"os\"\n)\n\nfunc Create(template template.Template) {\n\tskeleton := template.Skeleton\n\tcontext := template.Context\n\n\tfor i := range skeleto...
go
edit
0
7
mit
2b3143dfbb318efa6e3789f039375f5f8320be56
bronzdoc/orbi
skeleton/actions/create.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage benchmark_bbs_test\n\nimport (\n\t\"github.com/cloudfoundry-incubator/bbs/db/etcd\"\n\t\"github.com/cloudfoundry-incubator/benchmark-bbs/reporter\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nconst (\n\tConverg...
go
edit
21
1
apache-2.0
78588323dbb12a4769e42e65e8fd6334c5c5a4a6
cloudfoundry-incubator/benchmark-bbs
lrp_convergence_gather_test.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage marathon\n\nimport (\n\tclientmodel \"github.com/prometheus/client_golang/model\"\n)\n\nconst (\n\t// metaLabelPrefix is the meta prefix used for all meta labels in this discovery.\n\tmetaLabelPrefix = clientmodel.MetaLabelPrefix + \"ma...
go
edit
0
0
apache-2.0
47a96bff1a1945da3f7f61895340e6841288361a
Gouthamve/prometheus,wrouesnel/prometheus,dmilstein/prometheus,laushinka/prometheus,jbdalido/prometheus,sudhi-vm/prometheus,trigrass2/prometheus,eliothedeman/prometheus,trigrass2/prometheus,dsymonds/prometheus,eliothedeman/prometheus,keegancsmith/prometheus,jbdalido/prometheus,iksaif/prometheus,laushinka/prometheus,gcn...
retrieval/discovery/marathon/constants.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage libFileSwarm\n\nimport (\n\t\"libGFC\"\n\t\"libytc\"\n)\n\ntype State struct {\n\tswarmtracker libGFC.GFCChain\n\n\tswarmid string\n\thostcount uint64\n\thostredundancy uint64\n\ttotalspace uint64\n\n\tpiecemapping map[s...
go
edit
0
0
apache-2.0
348c12192961d4ee36303b2d0db61ff98a4734a4
Jonbeek/bytecoin
src/libFileSwarm/state.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2018 the u-root 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\npackage sh\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n)\n\n// Run runs ...
go
edit
0
2
bsd-3-clause
c14c37cbb8361fe1af576a72ef76bec2591e03f7
hugelgupf/u-root,u-root/u-root,u-root/u-root,hugelgupf/u-root,GanShun/u-root,GanShun/u-root,hugelgupf/u-root,hugelgupf/u-root,GanShun/u-root,u-root/u-root
pkg/sh/run.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage logger\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\ntype ioWriterMsgWriter struct {\n\tw io.Writer\n}\n\nfunc (iw *ioWriterMsgWriter) Write(msg Msg) error {\n\tbytes := append(msg.Bytes(), '\\n')\n\tn, err := iw.w.Write(bytes)\n\tif err != nil...
go
edit
12
3
mit
eab36ad8a39cbe0d33484f40a43d1553661ebd9a
Thomasdezeeuw/logger
writer.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage password\n\nimport (\n\t\"github.com/sirupsen/logrus\"\n\t\"github.com/skygeario/skygear-server/pkg/core/db\"\n)\n\ntype safeProviderImpl struct {\n\timpl *providerImpl\n\ttxContext db.SafeTxContext\n}\n\nfunc NewSafeProvider(\n\tb...
go
edit
18
1
apache-2.0
894647bf674492b7f0ece5bc6db0c63f275d5661
SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server
pkg/auth/dependency/provider/password/tx_provider.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cli\n\nimport (\n\t\"testing\"\n\n\t\"github.com/libopenstorage/openstorage/api\"\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestCmdMarshalProto(t *testing.T) {\n\tvolumeSpec := &api.VolumeSpec{\n\t\tSize: 64,\n\t\tFormat: ...
go
edit
3
1
apache-2.0
43996c7589f17c020526c4a07cb1913580736aad
pault84/openstorage,libopenstorage/openstorage,pault84/openstorage,libopenstorage/openstorage,pault84/openstorage,libopenstorage/openstorage
cli/cli_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build windows\n\npackage open\n\nimport (\n\t\"os/exec\"\n)\n\nfunc open(input string) *exec.Cmd {\n\treturn exec.Command(\"start\", \"\", input)\n}\n\nfunc openWith(input string, appName string) *exec.Cmd {\n\treturn exec.Command(\"start\"...
go
edit
0
1
apache-2.0
c47f41e3ae39061da76725981461d79a8c4109b2
ZhangKuixun/lantern,taohaoge/lantern,fangshili/lantern,ChenZeXian/lantern,taohaoge/lantern,xswm1123/lantern,Nuos/lantern,imcoddy/lantern,MinFu/lantern,whatts/lantern,Denniskevin/lantern,crazypoo/lantern,CJstar/lantern,imcoddy/lantern,willjunspecial/lantern,beealone/lantern,moooy/lantern,luinnx/lantern,zw532781787/lante...
open/exec_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage object\n\ntype Type string\n\nconst (\n\t/* Internal Types */\n\tRETURN_VALUE Type = \"<return value>\"\n\tFUNCTION Type = \"<function>\"\n\tNEXT Type = \"<next>\"\n\tBREAK Type = \"<break>\"\n\n\t/* Special Types */\...
go
edit
3
5
mit
5034d6a7d3f9ff718d5fe94dbdf538d60922c12f
pluto-language/pluto
object/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage index\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"io/ioutil\"\n\t\"text/template\"\n\n\t\"pkg.re/essentialkaos/ek.v9/fsutil\"\n\n\t\"github.com/gongled/vgrepo/storage\"\n)\n\n// ////////////////////////////////////////////////////////////////...
go
edit
0
6
mit
2ecb93652c275b571cb6d5b620f921aa12abd12c
gongled/vgrepo,gongled/vgrepo
index/index.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage pd1_test\n\nimport (\n\t// \"math/rand\"\n\t// \"reflect\"\n\t\"testing\"\n\t\"time\"\n\n\t// \"github.com/influxdb/influxdb/tsdb/engine/pd1\"\n)\n\nfunc TestEncoding_FloatBlock(t *testing.T) {\n\t// valueCount := 100\n\t// times := get...
go
edit
0
3
mit
5e59cb93932eeb6b3f725e721d34c596192f7e62
Mindera/influxdb,mre/influxdb,jipperinbham/influxdb,lgpeterson/influxdb,nickrobinson/influxdb,CVTJNII/influxdb-tjnii,jipperinbham/influxdb,linearb/influxdb,Mindera/influxdb,Mindera/influxdb,joaopedrotaveira/influxdb,sudabon/influxdb,benbjohnson/influxdb,bluebreezecf/influxdb,mark-rushakoff/influxdb,apigee/influxdb,blue...
tsdb/engine/pd1/encoding_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mdb\n\nimport (\n\t\"io\"\n)\n\ntype Machine struct {\n\tHostname string\n\tRequiredImage string `json:\",omitempty\"`\n\tPlannedImage string `json:\",omitempty\"`\n}\n\ntype Mdb struct {\n\tMachines []Machine\n}\n\nfunc (mdb *Mdb...
go
edit
0
2
apache-2.0
01715682eafc2ca7a366f117d5d1e537029cdbd6
rgooch/Dominator,keep94/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator,rgooch/Dominator,Symantec/Dominator,keep94/Dominator
lib/mdb/api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage core\n\nimport (\n\t\"log\"\n\n\t\"github.com/mdlayher/wavepipe/core/models\"\n\n\t\"github.com/wtolson/go-taglib\"\n)\n\n// fsManager scans for media files in a specified path, and queues them up for inclusion\n// in the wavepipe datab...
go
edit
6
5
mit
00210a807cfa206331a231a1d52f57df2622fca1
mdlayher/wavepipe,mdlayher/wavepipe
core/fsManager.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/wantedly/developers-account-mapper/services\"\n)\n\n// User stores login user name and accounts information\ntype User struct {\n\tLoginName string\n\tGitHubUsername string\n\tSlackUs...
go
edit
0
3
mit
6a21a30d8cf5853e0634b929c21037c526dc4e41
wantedly/developers-account-mapper
models/user.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage view\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"io/ioutil\"\n\t\"net/http\"\n)\n\ntype Render struct {\n\tURL string\n\tReader io.Reader\n}\n\ntype Item struct {\n\tHTML string `json:\"rendered_body\"`\n\tMarkdown string `js...
go
edit
3
2
apache-2.0
fbba21e532eea9f4d9faf9fbb3af3e91c74c6cdd
wataru0225/sreq
view/render.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage groupme\n\ntype gmMessage struct {\n\tGID string `json:\"group_id\"`\n\tName string `json:\"name\"`\n\tMID string `json:\"id\"`\n\tUID string `json:\"user_id\"`\n\tMessageText string `json:\"text...
go
edit
0
1
mit
613a5801437faa2425de29bec0ca5ea91109cbc1
NelsonLeDuc/CalmanBot,NelsonLeDuc/CalmanBot
service/groupme/gmmessage.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage swarm\n\nimport (\n\t\"common\"\n\t\"encoding/json\"\n)\n\ntype Heartbeat struct {\n\tId string\n\n\tBlockchain string\n\tHost string\n\tParentBlock string\n\n\tEntropyStage1 string\n\tEntropyStage2 string\n\tFileProofStage1...
go
edit
6
2
apache-2.0
96d8a71dac320477b520f26709ed9d9d0fe8fff0
emt13/Sia,emt13/Sia,Jonbeek/Sia,Jonbeek/Sia
src/swarm/heartbeat.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017 The Serulian 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\npackage compilerutil\n\n// ImmutableMap defines an immutable map struct, w...
go
edit
0
2
bsd-3-clause
7e5bd6ebe32743afd64b80ef26c5af7f5ae6b350
Serulian/compiler,Serulian/compiler
compilerutil/immutablemap.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build windows\n\npackage main\n\nimport (\n\t\"github.com/gorilla/websocket\"\n\t\"golang.org/x/crypto/ssh/terminal\"\n\n\t\"github.com/lxc/lxd\"\n)\n\nfunc controlSocketHandler(c *lxd.Client, control *websocket.Conn) {\n\t// TODO: figure o...
go
edit
0
2
apache-2.0
402d1a29be3c8ef4c801dc36f6a0a57a6cffd002
ollie314/lxd,georghopp/lxd,Skarlso/lxd,mjeanson/lxd,Malizor/lxd,lxc/lxd,jsavikko/lxd,hallyn/lxd,pcdummy/lxd,dustinkirkland/lxd,Malizor/lxd,ollie314/lxd,techtonik/lxd,hallyn/lxd,techtonik/lxd,lxc/lxd,chrisglass/lxd,lxc/lxd,hallyn/lxd,stgraber/lxd,atxwebs/lxd,jsavikko/lxd,hallyn/lxd,akshaykarle/lxd,dustinkirkland/lxd,eri...
lxc/exec_windows.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\n\t\"github.com/flosch/pongo2\"\n\t\"github.com/nathan-osman/informas/db\"\n)\n\n// login presents the login form.\nfunc (s *Server) login(w http.ResponseWriter, r *http.Request) {\n\tv...
go
edit
12
4
mit
1fb1394e83bb05775e26440ae7b5d51dc4241a32
nathan-osman/informas,nathan-osman/informas
server/login.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage util\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc doubleIt(v reflect.Value) reflect.Value {\n\treturn reflect.ValueOf(v.Int() * 2)\n}\n\nfunc TestMergeChannel(t *testing.T) {\n\tchan1 := make(chan reflect.Value)\n\tchan2 := make...
go
edit
3
3
apache-2.0
69aedd709be7de4b43e32d84b526bca92d5cb0b2
justicezyx/glow,chrislusf/glow,chrislusf/glow,justicezyx/glow
util/channel_util_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/CaliDog/certstream-go\"\n\tlogging \"github.com/op/go-logging\"\n)\n\nvar log = logging.MustGetLogger(\"example\")\n\nfunc main() {\n\tstream := certstream.CertStreamEventStream(false)\n\n\tfor jq := ran...
go
edit
3
3
mit
519a78936c598ccb445c7205a2889aaec7f34657
CaliDog/certstream-go
example/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"checks\"\n\t\"flag\"\n\t\"log\"\n\n\t\"github.com/mitchellh/go-ps\"\n)\n\nvar (\n\tgardenAddr = flag.String(\"gardenAddr\", \"localhost:9241\", \"Garden host and port (typically localhost:9241)\")\n\trequire...
go
edit
3
8
apache-2.0
227dac8b50c8817e3a85497e76ad405d5e453d5a
cloudfoundry-incubator/hakim
src/hakim/hakim.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage config\n\nimport (\n\t\"github.com/elastic/beats/libbeat/outputs\"\n\t\"time\"\n)\n\n// Defaults for config variables which are not set\nconst (\n\tDefaultCron string = \"@every 1m\"\n\tDefaultTimeout time.Duration =...
go
edit
0
0
apache-2.0
55fac398421a61cafa751ed030e95f4e8c210844
christiangalsterer/httpbeat
config/config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\t\"bazil.org/fuse\"\n\t\"bazil.org/fuse/fs\"\n\t\"github.com/a2sdl/etcfs\"\n)\n\nfunc main() {\n\tmountpoint := \"/tmp/nginx\"\n\tconn, err := fuse.Mount(\n\t\tmountpoint,\n\t\tfuse.FSName(\"etcfs\"),\n\t...
go
edit
0
3
apache-2.0
3080d9b0278d5b191b2bfc992b8593422ae03575
a2sdl/etcfs
cmd/etcfs.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
e4fac5a7d2cbde27f56b1ca9af616cf8f4dbe841
kubernetes/csi-api,kubernetes/csi-api
pkg/client/informers/externalversions/internalinterfaces/factory_interfaces.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage functional\n\nimport (\n\t\"testing\"\n\n\t\"github.com/coreos/fleet/functional/platform\"\n)\n\nfunc TestSignedRequests(t *testing.T) {\n\tcluster, err := platform.NewNspawnCluster(\"smoke\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n...
go
edit
12
9
apache-2.0
890f0379bb7f8d1009d1fc03ca79f2366f7a0bd2
giantswarm/fleet,dongsupark/fleet,hhoover/fleet,octoblu/fleet,coreos/fleet,wuqixuan/fleet,mischief/fleet,wuqixuan/fleet,coreos/fleet,endocode/fleet,thepwagner/fleet,giantswarm/fleet,WPMedia/fleet,WPMedia/fleet,mwitkow-io/fleet,improbable-io/fleet,improbable-io/fleet,mookjp/fleet,mwhooker/fleet,webwlsong/fleet,thepwagne...
functional/signing_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage notify\n\nimport \"testing\"\n\nfunc TestRuntime(t *testing.T) {\n\tt.Skip(\"TODO(rjeczalik)\")\n}\n\n```\n\nApply this change: Add stub for Runtime test" }, { "role": "assistant", "content": "package notify\n\nimport (\n\t\...
go
edit
18
3
mit
efe7102432f3d147f5d34528682c32b2814e4222
Fiery/notify,rjeczalik/notify,pblaszczyk/notify,Zillode/notify
runtime_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//+build ignore\n// Simple example that will nuke the contents of a s3 bucket\npackage main\n\nimport (\n\t\"fmt\"\n\t\"runtime\"\n\t\"s3\"\n)\n\nfunc init() {\n\t// multicorebitches\n\truntime.GOMAXPROCS(runtime.NumCPU())\n}\n\nfunc printKey(k...
go
edit
0
3
mit
16e08047861d8a350ae4588a9b370c0d688d47d8
giulioungaretti/S3
example/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common\n\nconst (\n\tusageNotes = `Notes:\n --roles=node,proxy,auth\n\n This flag tells Teleport which services to run. By default it runs all three. \n In a production environment you may want to separate them.\n\n --token=xyz\n\n ...
go
edit
0
0
apache-2.0
1be5cec1838d1b2117433b13e9cb81c811f57a57
gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport,gravitational/teleport
tool/teleport/common/usage.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage converter\n\nimport (\n\t\"fmt\"\n\t\"log\"\n)\n\ntype KrSpaKa struct {\n\tcomma rune\n}\n\nfunc NewKrSpaKa() KrSpaKa {\n\treturn KrSpaKa{\n\t\tcomma: ';',\n\t}\n}\n\nfunc (k KrSpaKa) Comma() rune {\n\treturn k.comma\n}\n\nfunc (k KrSpa...
go
edit
12
3
mit
afa8e5904d449b7d7df4a5a26ea239e2aae28761
st3sch/whycc,st3sch/whycc
bankfile/converter/krspaka.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage api\n\nimport (\n \"launchpad.net/gocheck\"\n \"time\"\n \"os\"\n)\n\nfunc (s *S) TestMountDirectoryFromTime(c *gocheck.C){\n time := time.Date(2009,time.November,15,21,40,03,0, time.Local)\n var ret = mountDirectoryPathF...
go
edit
12
1
mit
2cc5280564526fe6f1c9731f470c620c83976d29
aoqfonseca/mediaRepository
api/util_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage object\n\ntype Type string\n\nconst (\n\t/* Internal Types */\n\tRETURN_VALUE Type = \"<return value>\"\n\tFUNCTION Type = \"<function>\"\n\tNEXT Type = \"<next>\"\n\tBREAK Type = \"<break>\"\n\tAPL_BLOCK Type = \"...
go
edit
3
5
mit
ce572432f91d48f35559925bfa4a15f8dbbce30a
pluto-language/pluto
object/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage proj\n\nimport (\n\t\"math\"\n)\n\n// A SphericalMercator represents a spherical Mercator projection.\ntype SphericalMercator struct {\n\tcode int\n\tr float64\n}\n\n// Code returns sm's EPSG code.\nfunc (sm *SphericalMercator) Code(...
go
edit
0
1
bsd-2-clause
6413895f46e80ba1bac24941635cd546ed898831
twpayne/go-proj,twpayne/go-proj
sphericalmercator.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/fzzy/radix/redis\"\n\t\"strconv\"\n\t\"time\"\n)\n\nconst N = 1000000\n\nfunc main() {\n\tc, err := redis.DialTimeout(\"tcp\", \"127.0.0.1:6379\", time.Duration(10)*time.Second)\n\tif err != n...
go
edit
0
4
apache-2.0
7d756ebd4faa0d587479eba38d34a9c86a27f169
stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks,stefanwille/redis-client-benchmarks
Go/go_radix_performance.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage goat\n\nimport (\n\t\"fmt\"\n)\n\nfunc Manager(killChan chan bool, doneChan chan int) {\n\tfor {\n\t\tselect {\n\t\tcase <-killChan:\n\t\t\t//change this to kill workers gracefully and exit\n\t\t\tfmt.Println(\"done\")\n\t\t\tdoneChan <...
go
edit
0
3
mit
de36d391b98c4d26b55c860a0f6dd613786dd42e
mdlayher/goat
src/goat/manager.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\"log\"\n\t\"net/http\"\n\t\"strings\"\n)\n\nconst baseURL = \"https://api.github.com/search/repositories\"\n\nfunc escapeSearch(s string) string {\n\treturn strings.Replace(s, \" \", \"+\", -...
go
edit
0
2
mit
52cbab29712b1448aa587ac3b3f9414b16a40800
keith/ghs
ghs.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage tools\n\nimport (\n\t\"net/http\"\n)\n\n//Get the client ip address...\nfunc GetClientAddr(r *http.Request) string {\n\tip := r.Header.Get(\"X-Real-IP\")\n\tif 0 == len(ip) {\n\t\tip = r.Header.Get(\"X-Forwarded-For\")\n\t\tif 0 == len(...
go
edit
0
3
mit
48f42b22f314edb46d924f9425d7ab3b49067a5d
scritch007/go-tools
net.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage v3\n\nimport (\n\tprojectv3 \"github.com/rancher/rancher/pkg/apis/project.cattle.io/v3\"\n\t\"github.com/rancher/rke/types/image\"\n)\n\nvar (\n\tm = image.Mirror\n\n\tToolsSystemImages = struct {\n\t\tPipelineSystemImages projectv3.Pip...
go
edit
6
0
apache-2.0
8ff89401f758cf9a3a4cadbdec63d31e8182c160
rancher/rancher,rancher/rancher,rancher/rancher,rancher/rancher,rancherio/rancher,rancherio/rancher
pkg/apis/management.cattle.io/v3/tools_system_images.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main_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\"testing\"\n)\n\nfunc TestRoutingApiCli(t *testing.T) {\n\tRegisterFailHandler(Fail)\n\tRunSpecs(t, \"Routin...
go
edit
12
1
apache-2.0
244143baf3ef64c3419b6f33a20e3a94fc3362ca
cloudfoundry-incubator/routing-api-cli,cloudfoundry-incubator/routing-api-cli
routing_api_cli_suite_test.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\"fmt\"\n\tsci \"github.com/samuell/scipipe\"\n)\n\nfunc main() {\n\tsci.InitLogDebug()\n\n\tfmt.Println(\"Starting program!\")\n\tls := sci.Shell(\"ls -l / > {os:lsl}\")\n\tls.OutPathFuncs[\"lsl\"] = func(tsk *sci.S...
go
edit
0
1
mit
18918fe5ac0a9ade8643630bd86a02931143e8ab
scipipe/scipipe,samuell/scipipe,scipipe/scipipe
examples/ex13fifo/ex13fifo.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage smoke\n\nimport (\n\t\"time\"\n\n\t\"github.com/cloudfoundry-incubator/cf-test-helpers/cf\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\t. \"github.com/onsi/gomega/gexec\"\n)\n\nconst (\n\tSimpleBinaryAppBitsPath =...
go
edit
15
2
apache-2.0
c7d6b7885982b589134835f11c7cae0c60a059f2
cloudfoundry/cf-smoke-tests,cloudfoundry/cf-smoke-tests,cloudfoundry/cf-smoke-tests,cloudfoundry/cf-smoke-tests
smoke/helpers.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage web\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gorilla/sessions\"\n)\n\nconst SESSION_NAME = \"funrepo\"\nconst SESSION_USER_KEY = \"auth_user\"\n\ntype Session struct {\n\t*sessions.Session\n}\n\nfunc (session *Session) AuthUser() *...
go
edit
18
2
mit
f363f262a11ce804f01bf8fbb9674796bb9ad4b3
subuk/vmango,subuk/vmango,subuk/vmango,subuk/vmango,subuk/vmango,subuk/vmango
web/env_session.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage index\n\nimport ()\n\n// Pointer within a file\ntype filePointer uint64\n\n// Index of word positions in the lexicon file\ntype fileIndex map[string][]filePointer\n\n// Adds a lexicon position for a word\nfunc (fi fileIndex) add(word st...
go
edit
6
4
mit
b1db929263028b3c26c38fa67fcbaf70c5a1a8f1
maxnordlund/adk,maxnordlund/adk,maxnordlund/adk,maxnordlund/adk
labb1/index/index.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\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/bifurcation/mint\"\n)\n\nvar port string\n\nfunc main() {\n\tvar config mint.Config\n\tconfig.Init(false)\n\n\tflag.StringVar(&port, \"port\", \"4430\"...
go
edit
0
2
mit
42fb45fefb1a055b29a684fb30515e4d87822cbd
bifurcation/mint,yaronf/mint
bin/mint-server-https/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/satori/go.uuid\"\n)\n\nfunc main() {\n\tu := uuid.NewV4()\n\tfmt.Println(u)\n}\n\n```\n\nApply this change: Test panic message while writing a file" }, { "role": "assistant", "co...
go
edit
0
2
mit
485ef3766dec44caa52fa5731e6cb66f8ab4664b
bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile,bmaupin/junkpile
go/misc/test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Chef client command-line tool.\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/marpaia/chef-golang\"\n\t\"github.com/shurcooL/go-goon\"\n)\n\nvar _ = goon.Dump\n\nfunc chefConnect() *chef.Chef {\n\tc, err := chef...
go
edit
0
4
mit
bf893288b0e5a007b2d9abcd25695eedf11a4d74
shurcooL/go
cmd/table/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage artnet\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"strings\"\n)\n\nconst (\n\t// addressRange specifies the network CIDR an artnet network should have\n\taddressRange = \"2.0.0.0/8\"\n)\n\n// FindArtNetIP finds the matching interface with an...
go
edit
0
5
mit
de80557a1bd3e2ff1e06e8a1d8d382b4fff9b8d6
StageAutoControl/controller
pkg/artnet/ip.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage validates\n\nimport (\n\t\"github.com/mitsuse/matrix-go\"\n)\n\nconst (\n\tNON_POSITIVE_SIZE_PANIC = iota\n\tDIFFERENT_SIZE_PANIC\n\tOUT_OF_RANGE_PANIC\n)\n\nfunc ShapeShouldBePositive(row, column int) {\n\tif row > 0 && column > 0 {\n\...
go
edit
0
5
mit
62ca57238b5b706993491bef9a8d43e863bb2190
mitsuse/matrix-go,jmptrader/matrix-go
validates/validates.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage command\n\nimport (\n\t\"strings\"\n\t\"os\"\n\t\"log\"\n\t\"fmt\"\n\t\"github.com/wantedly/developers-account-mapper/store\"\n\t\"github.com/wantedly/developers-account-mapper/models\"\n)\n\ntype RegisterCommand struct {\n\tMeta\n}\n\n...
go
edit
3
4
mit
0f76bcd6c8057d70ca1a1022c800aa1e048c0f01
wantedly/developers-account-mapper
command/register.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\r\n\r\nimport (\r\n\t\"image/color\"\r\n\t\"github.com/ajhager/rog\"\r\n)\r\n\r\nfunc game(w *rog.Window) {\r\n\tgrey := color.RGBA{20, 20, 20, 255}\r\n\tfor x := 0; x < 40; x++ {\r\n\t\tfor y := 0; y < 20; y++ {\r\n\t\t\tpurple :=...
go
edit
0
3
bsd-2-clause
b5838e3ce503c8ccd54bc29ff91a9bb83b8bab09
dparis/rog,dparis/rog,ajhager/rog,ajhager/rog
examples/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//go:build !(aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris)\n\npackage nbconn\n\n// Not using unix build tag for support on Go 1.18.\n\nfunc (c *NetConn) realNonblockingWrite...
go
edit
6
1
mit
906f709e0c779acdc3904b3127dd6be2a9cf1cee
jackc/pgx,jackc/pgx,jackc/pgx,jackc/pgx
internal/nbconn/nbconn_fake_non_block.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage client\n\nimport (\n\t\"bytes\"\n\t\"testing\"\n)\n\nfunc TestBytes(t *testing.T) {\n\tr := client.Cmd(\"get\", \"k\").Bytes()\n\n\tif !bytes.Equal(r, []byte(\"v\")) {\n\t\tt.Logf(\"expect bytes [% #x], but get[ % #x]\\n\", []byte(\"v\"...
go
edit
0
3
mit
fd0ba3a3f5926f6ee31220ce15c2966cd2cf682a
kofj/redlot
client/reply_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/**\n * Copyright 2014 Paul Querna\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:...
go
edit
6
4
apache-2.0
c0fbe6e233c2bf9cc76012a01deef9885a514879
trigrass2/ffjson,cw2018/ffjson,xladykiller/ffjson,cmeon/ffjson,pquerna/ffjson,sunminghong/ffjson,cmeon/ffjson,trigrass2/ffjson,xyliuke/ffjson,xyliuke/ffjson,jamesliu96/ffjson,xiuzhifu/ffjson,pquerna/ffjson,xladykiller/ffjson,cw2018/ffjson,jamesliu96/ffjson,sunminghong/ffjson,xiuzhifu/ffjson
generator/generator.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage admin\n\nimport (\n\t\"time\"\n\n\t\"github.com/qor/qor-example/app/models\"\n)\n\nfunc initFuncMap() {\n\tAdmin.RegisterFuncMap(\"latest_orders\", latestOrders)\n\t// Admin.RegisterFuncMap(\"last_week_orders_chart\", lastWeekOrderChart...
go
edit
6
1
mit
d618440ac9c78b20a44a2372ec6a9991a36b47ae
grengojbo/qor-example,qor/qor-example,grengojbo/qor-example,qor/qor-example,qor/qor-example,firestudios/qor-example,grengojbo/qor-example,firestudios/qor-example,firestudios/qor-example
config/admin/funcmap.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage netflow9\n\nimport (\n\t\"encoding/hex\"\n\t\"fmt\"\n)\n\nfunc Dump(p *Packet) {\n\tfmt.Println(\"NetFlow version 9 packet\")\n\tfor _, ds := range p.DataFlowSets {\n\t\tfmt.Println(\" data set\")\n\t\tif ds.Records == nil {\n\t\t\tfmt...
go
edit
3
7
mit
a3c84182c0b36519c89ef0a6233aed44ac5a9e6b
tehmaze/netflow
netflow9/dump.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 NF Design UG (haftungsbeschraenkt). All rights reserved.\n// Use of this source code is governed by the Apache License v2.0\n// which can be found in the LICENSE file.\n\npackage imapclient\n\nimport (\n\t\"testing\"\n\t\"time...
go
edit
6
5
apache-2.0
8c8ff0e77793ab4db1dfef9ccc16e92a8d056e6d
nfdesign/maping
imapclient/date_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage svg\n\n// InstructionType tells our path drawing library which function it has\n// to call\ntype InstructionType int\n\n// These are instruction types that we use with our path drawing library\nconst (\n\tPathInstruction InstructionType...
go
edit
9
0
mit
3b13756dd8d6a00e9177e9f5769cca5a42b64c76
rustyoz/svg
drawinginstruction.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage glfw3\n\n//#define GLFW_EXPOSE_NATIVE_COCOA\n//#define GLFW_EXPOSE_NATIVE_NSGL\n//#include \"glfw/include/GLFW/glfw3.h\"\n//#include \"glfw/include/GLFW/glfw3native.h\"\nimport \"C\"\n\nfunc (w *Window) GetCocoaWindow() C.id {\n\treturn...
go
edit
3
0
bsd-3-clause
d5aec0848a30fb6b7526384db9cc04727d69de09
azul3d/native-glfw,azul3d/native-glfw
native_darwin.go
accepted
null
true