messages
listlengths
2
2
language
stringclasses
8 values
prompt_type
stringclasses
2 values
lint_errors
int64
0
129
⌀
cyclomatic_complexity
int64
0
32
⌀
license
stringclasses
7 values
commit
stringlengths
40
40
repos
stringlengths
5
116k
new_file
stringlengths
4
220
status
stringclasses
6 values
error
stringlengths
26
74
⌀
is_valid_syntax
bool
2 classes
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/hybridgroup/gobot\"\n\t\"github.com/hybridgroup/gobot/platforms/ble\"\n)\n\nfunc main() {\n\tgbot := gobot.NewGobot()\n\n\tbleAdaptor := ble.NewBLEClientAdaptor(\"ble\", os.Args[1...
go
edit
0
1
apache-2.0
5b29de3ff7c457c6fc5e399e420133968c1773bc
nzmichaelh/gobot,nzmichaelh/gobot
examples/ollie_roll.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n)\n\ntype Reference struct {\n\tObjectId *ObjectID `json:\",omitempty\"`\n\tId string `json:\",omitempty\"`\n\tType string `json:\",omitempty\"`\n}\n\nfunc NewReference(...
go
edit
6
2
apache-2.0
38735f5c76acc3b7e88bce7e59b1b0d05d3857f3
af83/edwig,af83/edwig,af83/edwig
model/reference.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage command\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/igungor/tlbot\"\n)\n\nfunc init() {\n\tregister(cmdToday)\n}\n\nvar cmdToday = &Command{\n\tName: \"bugun\",\n\tShortLine: \"bugün günlerden ne?\",\n\tRun: runToday...
go
edit
6
1
mit
88727775d69e9b33df72c4e6648d09bcb3c346c5
igungor/ilberbot,igungor/ilber
command/today.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build linux darwin\n\npackage logging\n\nimport (\n\tslog \"log/syslog\"\n\n\tlog \"gopkg.in/inconshreveable/log15.v2\"\n)\n\n// getSystemHandler on Linux writes messages to syslog.\nfunc getSystemHandler(syslog string, debug bool, format l...
go
edit
0
3
apache-2.0
d3282567a68491e4a494e3a028ea1d74f2497b77
lxc/lxd,hallyn/lxd,stgraber/lxd,pcdummy/lxd,jsavikko/lxd,lxc/lxd,Skarlso/lxd,stgraber/lxd,jsavikko/lxd,erikmack/lxd,hallyn/lxd,erikmack/lxd,hallyn/lxd,hallyn/lxd,mjeanson/lxd,atxwebs/lxd,lxc/lxd,stgraber/lxd,pcdummy/lxd,stgraber/lxd,pcdummy/lxd,mjeanson/lxd,erikmack/lxd,hallyn/lxd,atxwebs/lxd,atxwebs/lxd,lxc/lxd,Skarls...
shared/logging/log_posix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !noglobals\n\npackage inj\n\n//////////////////////////////////////////////\n// Interface definitions\n//////////////////////////////////////////////\n\n// A Grapher is anything that can represent an application graph\ntype Grapher in...
go
edit
3
1
mit
28dd612e782e624c7e3d3bfdcfb3918f70c18cad
yourheropaul/inj
api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/* netcheck: check whether a given network or address overlaps with any existing routes */\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\n\tweavenet \"github.com/weaveworks/weave/net\"\n)\n\nfunc fatal(err error) {\n\tfmt.Println(...
go
edit
0
5
apache-2.0
91099694c9308ed5a1319587f5f1d9ab27ecf972
weaveworks/weave,cgvarela/weave,kidaa/weave,paladin74/weave,achanda/weave,2opremio/weave,dpw/weave,tomwilkie/weave,paulbellamy/weave,dpw/weave,dpw/weave,BWITS/weave,rade/weave,achanda/weave,2opremio/weave,aaam/weave,bboreham/weave,aaam/weave,2opremio/weave,paulbellamy/weave,tomwilkie/weave,OnePaaS/weave,paladin74/weave...
prog/netcheck/netcheck.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage entity\n\nimport (\n\t\"github.com/jinzhu/gorm\"\n)\n\n// Tag is a descriptive identifier given to ease searchability\ntype Tag struct {\n\tgorm.Model\n\n\tValue string `sql:\"type:text\" gorm:\"unique;not null\"`\n\tFlags []*Flag `gor...
go
edit
3
0
apache-2.0
e7937ceb09639e3b6dc22be2d69aa59016c5e5d0
checkr/flagr,checkr/flagr,checkr/flagr,checkr/flagr
pkg/entity/tag.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2014 Google Inc. All rights reserved.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://ww...
go
edit
3
4
apache-2.0
eafd142dfaca8f936f2a991330767d3e97bc19c9
andrewstuart/kubernetes,amos6224/kubernetes,mindprince/kubernetes,pires/kubernetes,whitlockjc/kubernetes,gluke77/kubernetes,pugna0/kubernetes,bcbroussard/kubernetes-travis,fabriziopandini/kubernetes,zhangmingld/kubernetes,smerrill/kubernetes,shenshouer/kubernetes,vallard/kubernetes,jlz27/kubernetes,wb14123/kubernetes,m...
pkg/healthz/healthz_test.go
accepted
null
true
[ { "role": "user", "content": "Write go code for the following: Add distanceFunc interface to metrics." }, { "role": "assistant", "content": "// Package pairwise implements utilities to evaluate pairwise distances or inner product (via kernel).\npackage pairwise\n\nimport (\n\t\"github.com/gonum/...
go
new_file
0
0
mit
1a8177afe77d78022865b32b1df2fddcf17bf1d3
jmptrader/golearn,gitforhf/golearn,jacobxk/golearn,thedadams/golearn,elkingtonmcb/golearn,beni55/golearn,tempbottle/golearn,thedadams/golearn,ghs11/golearn,jacobxk/golearn,tempbottle/golearn,liudhzhyym/golearn,sjwhitworth/golearn,dboyliao/golearn,gitforhf/golearn,hsavit1/golearn,hsavit1/golearn,EtienneBruines/golearn,g...
metrics/pairwise/pairwise.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nWrite a function that takes a string as input and returns the string reversed.\n\nExample:\nGiven s = \"hello\", return \"olleh\".\n*/\n\npackage main\n\nimport (\n\t\"fmt\"\n)\n\nfunc main() {\n\ttests := [][]string{{\"\", \"\"}, {\" \", \...
go
edit
0
3
mit
2d8a89ad3e455785fe579a8950cc8a50dc9568e0
astdb/Misc,astdb/Misc,astdb/Misc,astdb/Misc,astdb/TB_ShortProbs,astdb/TB_ShortProbs,astdb/Misc,astdb/Misc,astdb/TB_ShortProbs
ReverseStr.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage command\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/igungor/tlbot\"\n)\n\nfunc init() {\n\tregister(cmdToday)\n}\n\nvar cmdToday = &Command{\n\tName: \"bugun\",\n\tShortLine: \"bugun gunlerden ne?\",\n\tRun: runToday...
go
edit
0
1
mit
89594c065262f298d8efe7079e67edc74d24548e
igungor/ilberbot,igungor/ilber
command/today.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gerrit\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n)\n\n// GetCommit retrieves a commit of a project.\n// The commit must be visible to the caller.\n//\n// Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api-projec...
go
edit
12
3
mit
43cfd7a94eb4c4005ddfaa44afec1f41fc49c07d
andygrunwald/diffy,andygrunwald/go-gerrit
projects_commit.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage discord\n\nimport (\n\t\"strings\"\n\n\t\"github.com/bwmarrin/discordgo\"\n)\n\ntype dsMessage struct {\n\t*discordgo.Message\n\tsession *discordgo.Session\n}\n\nfunc (d dsMessage) GroupID() string {\n\treturn d.ChannelID\n}\n\nfunc (d ...
go
edit
18
2
mit
3d8690ab3f74598fe606735fb771ebf86f49ce31
NelsonLeDuc/CalmanBot,NelsonLeDuc/CalmanBot
service/discord/dsmessage.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage engine\n\nimport (\n\t\"github.com/coreos/coreinit/machine\"\n\t\"github.com/coreos/coreinit/registry\"\n)\n\ntype Engine struct {\n\tdispatcher *Dispatcher\n\twatcher *JobWatcher\n\tregistry *registry.Registry\n\tmachine *machi...
go
edit
15
1
apache-2.0
046c90047faaffb81e082632168667592a29e34d
flandr/fleet,mookjp/fleet,improbable-io/fleet,improbable-io/fleet,endocode/fleet,mookjp/fleet,paveltiunov/fleet,esatterwhite/fleet,bcwaldon/fleet,thepwagner/fleet,mwitkow-io/fleet,bcwaldon/fleet,wuqixuan/fleet,hhoover/fleet,ecnahc515/fleet,jonboulle/fleet,giantswarm/fleet,flandr/fleet,giantswarm/fleet,endocode/fleet,mw...
engine/engine.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage player\n\nimport (\n\t\"io\"\n\t\"os/exec\"\n\t\"log\"\n\n\t\"github.com/aws/aws-sdk-go/service/polly\"\n)\n\nfunc Play(resp *polly.SynthesizeSpeechOutput, logger *log.Logger) error {\n\tcmd := exec.Command(\"play\", \"-t\", \"mp3\", \"...
go
edit
0
3
mit
79c5011fb58aa1111c3f81bd41dd50d8ced5f282
bamchoh/nagome-polly
player/player.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Module objects\n\npackage py\n\nimport (\n\t\"fmt\"\n)\n\nvar (\n\t// Registry of installed modules\n\tmodules = make(map[string]*Module)\n\t// Builtin module\n\tBuiltins *Module\n)\n\n// A python Module object\ntype Module struct {\n\tName ...
go
edit
21
3
bsd-3-clause
03f02c00edf62b8e44ad3d99a9216fdbbdf90fc5
go-python/gpython,go-python/gpython,go-python/gpython,go-python/gpython,go-python/gpython,go-python/gpython
py/module.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\"log\"\n\t\"time\"\n\n\t\"github.com/ecc1/medtronic\"\n\t\"github.com/ecc1/medtronic/packet\"\n)\n\nconst (\n\tverbose = true\n)\n\nfunc main() {\n\tif verbose {\n\t\tlog.SetFlags(log.Ltime | log.Lmicroseconds | log...
go
edit
0
7
mit
043c8fdef7f4caf24105ad1a5d7558f79437df2b
ecc1/medtronic,ecc1/medtronic
cmd/sniff/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"os\"\n \"time\"\n\n tm \"github.com/buger/goterm\"\n)\n\nfunc main() {\n command := os.Args[1:]\n tm.Clear()\n loop(1*time.Second, func() {\n render(command)\n })\n}\n\nfunc render(command []string) {\n t...
go
edit
0
3
mit
dafdbc0508f7052c5c32e92413a88289597d39f5
ostera/watch,ostera/watch
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"io\"\n\t\"log\"\n\t\"net/url\"\n\t\"os\"\n\n\t\"github.com/bkittelmann/pinboard-checker/pinboard\"\n\t\"github.com/spf13/cobra\"\n)\n\nfunc init() {\n\texportCmd.Flags().StringP(\"token\", \"t\", \"\", \"The pinboar...
go
edit
3
3
mit
2db9ada0e417d18b6660d5f9640973eeaf9dfe17
bkittelmann/pinboard-checker,bkittelmann/pinboard-checker
cmd/export.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/itsankoff/gotcha/server\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := server.New()\n\twss := server.NewWebSocket()\n\ts.AddTransport(\"127.0.0.1:9000\", &wss)\n\tdone := make(chan interface{})\n\n\terr := s.S...
go
edit
0
4
mit
e4dbfeb8d773865f87e97607a453d3e6324def53
itsankoff/gotcha,itsankoff/gotcha
cmd/server/main.go
accepted
null
true
[ { "role": "user", "content": "Write go code for the following: Add a test for the signer/universal package" }, { "role": "assistant", "content": "package universal\n\nimport (\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/cloudflare/cfssl/config\"\n)\n\nvar expiry = 1 * time.Minute\nvar validLoca...
go
new_file
6
2
bsd-2-clause
f404960e5ed9f69c27b2e34b7ae4fb99c685568e
letsencrypt/cfssl,haneric21/cfssl,j-delaney/cfssl,j-delaney/cfssl,BugRoger/cfssl,rolandshoemaker/cfssl,jmhodges/cfssl,bifurcation/cfssl,mitchcapper/cfssl,sdgdsffdsfff/cfssl,bossjones/cfssl,gtank/cfssl,thesamet/cfssl,geligaoli/cfssl,mitchcapper/cfssl,sdgdsffdsfff/cfssl,APTy/cfssl,wl2002/cfssl,drcapulet/cfssl,mclem/cfssl...
signer/universal/universal_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2015 The Things Network\n// Use of this source code is governed by the MIT license that can be found in the LICENSE file.\n\n// Package log provides some handy types and method to activate and deactivate specific log\n// behavior...
go
edit
0
1
mit
3b27d8ab0a04150427faacf7507e1536c7f7ee6d
LoRaWanSoFa/ttn,jvanmalder/ttn,TheThingsNetwork/ttn,mgranberry/ttn,jvanmalder/ttn,mgranberry/ttn,TheThingsNetwork/ttn,mgranberry/ttn,TheThingsNetwork/ttn,jvanmalder/ttn,LoRaWanSoFa/ttn
utils/log/log.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nPackage consts implements constants for the entire project\n*/\npackage consts\n\n// ConfigurationFileName is the configuration file name of Goyave\nconst ConfigurationFileName = \".goyave\"\n\n```\n\nApply this change: Add the name of a Gi...
go
edit
0
0
mit
4b6a948ecf7aef05db618e5e82fbe323f707182c
k0pernicus/goyave
consts/consts.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2021 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
6a8ccc9615f97aed7985317718398c1619cc81d5
kubernetes/enhancements,kubernetes/enhancements,kubernetes/enhancements
api/document.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\nfunc main() {\n\tvar input string\n\n\tflag.StringVar(&input, \"input\", \"\", \"input file\")\n\tflag.Parse()\n\n\tif input == \"\" {\n\t\tflag.Usage()\n\t\tos.Exit(1)\n\t}\n\n\tv...
go
edit
3
10
mit
f1362d902b038e1f36d77999fd4d3d63c000ab9e
marcusolsson/gointro
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build !windows\n\npackage fzf\n\nconst (\n\t// Reader\n\tdefaultCommand = `find . -path '*/\\.*' -prune -o -type f -print -o -type l -print 2> /dev/null | sed s/^..//`\n)\n\n```\n\nApply this change: Add -L flag to the default find command\...
go
edit
0
0
mit
f96173cbe4129124e6cbf66804e06dbabc9066c3
tomfitzhenry/pkg-fzf,junegunn/fzf,janlazo/fzf,wilywampa/fzf,wilywampa/fzf,janlazo/fzf,tomfitzhenry/pkg-fzf,infokiller/fzf,junegunn/fzf,tomfitzhenry/pkg-fzf,stuha/wbr-zsh,infokiller/fzf,infokiller/fzf,wilywampa/fzf,janlazo/fzf,junegunn/fzf
src/constants_unix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build windows\n\npackage util\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"syscall\"\n)\n\n// ExecCommand executes the given command with cmd\nfunc ExecCommand(command string) *exec.Cmd {\n\treturn ExecCommandWith(\"cmd\", command)\n}\n\n// Ex...
go
edit
15
1
mit
438f6c96cdc56e1bb3cc12daa16ae08b2ccae18b
infokiller/fzf,wilywampa/fzf,stuha/wbr-zsh,infokiller/fzf,janlazo/fzf,wilywampa/fzf,infokiller/fzf,junegunn/fzf,junegunn/fzf,janlazo/fzf,junegunn/fzf,janlazo/fzf,wilywampa/fzf
src/util/util_windows.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage app\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"regexp\"\n\t\"sync\"\n\n\t\"github.com/stevenjack/cig/output\"\n\t\"github.com/stevenjack/cig/repo\"\n)\n\nfunc Handle(repoList map[string]string, projectTypeToCheck string,...
go
edit
0
5
mit
7de0c75ebf23b40a4b3d2fd95a59ce28f9551f33
stevenjack/cig,stevenjack/cig
app/app.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage geoip\n\nimport (\n\t\"fmt\"\n\t. \"launchpad.net/gocheck\"\n\t\"testing\"\n)\n\n// Hook up gocheck into the gotest runner.\nfunc Test(t *testing.T) { TestingT(t) }\n\ntype GeoIPSuite struct {\n}\n\nvar _ = Suite(&GeoIPSuite{})\n\nfunc ...
go
edit
24
3
mit
dd5457f5ab1f60db3c5e53a1e0a23c3c3817c2b6
abh/geoip,abh/geoip,etix/geoip,aziontech/geoip,davemarchevsky/geoip,davemarchevsky/geoip,etix/geoip,mailgun/geoip,aziontech/geoip,mailgun/geoip
geoip_test.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ActiveObject\n\nimport (\n\t\"errors\"\n\t\"time\"\n)\n\n//ActiveObjectWithInterval implements IActiveObject with behavior running in a specified interval\ntype ActiveObjectWithInterval struct {\n\tticker *time.Ticker\n\tdoneChanne...
go
edit
21
4
mit
7bf766d085e819b35806564c9b7557c151e91c00
irwansyahwii/Pattern-Oriented-Software-Architecture-With-Go
ConcurrencyPatterns/ActiveObject/ActiveObjectWithInterval.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage initialize\n\nimport (\n\t\"testing\"\n)\n\nfunc TestParseHeaderCRLF(t *testing.T) {\n\tconfigs := []string{\n\t\t\"#cloud-config\\nfoo: bar\",\n\t\t\"#cloud-config\\r\\nfoo: bar\",\n\t}\n\n\tfor i, config := range configs {\n\t\t_, err...
go
edit
9
5
apache-2.0
f6d8190e8f62ce239158be8ffeb9ca63432c28b3
sigma/coreos-cloudinit,endocode/coreos-cloudinit,mischief/coreos-cloudinit,endocode/coreos-cloudinit,snailwalker/coreos-cloudinit,rancher/coreos-cloudinit,crawford/coreos-cloudinit,cusspvz/coreos-cloudinit,rancher/coreos-cloudinit,davidwalter0/coreos-cloudinit,mischief/coreos-cloudinit,packethost/coreos-cloudinit,david...
initialize/user_data_test.go
rejected_lint
Too many lint violations: 9
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 !amd64,!s390x\n\npackage aes12\n\n// newCipher calls the newCipherGene...
go
edit
9
1
mit
2278c3bb5d33bb2676838161c8cc023e70d5d2d5
lucas-clemente/aes12
cipher_generic.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage locket\n\nimport (\n\t\"code.cloudfoundry.org/cfhttp\"\n\t\"code.cloudfoundry.org/lager\"\n\t\"code.cloudfoundry.org/locket/models\"\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials\"\n)\n\ntype ClientLocketConfig s...
go
edit
0
3
apache-2.0
a9d7dee03864dcea888e4ed0700af40a8d45d1ce
cloudfoundry-incubator/locket
locket_client.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage turbulence\n\nimport \"github.com/pivotal-cf-experimental/destiny/ops\"\n\ntype ConfigV2 struct {\n\tName string\n\tAZs []string\n\tDirectorHost string\n\tDirectorUsername string\n\tDirectorPassword string\n...
go
edit
3
1
apache-2.0
aad1da3724f93a8a77557ad84658171bc5860828
pivotal-cf-experimental/destiny,pivotal-cf-experimental/destiny
turbulence/manifest_v2.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"runtime\"\n\n\tstub \"github.com/banzaicloud/bank-vaults/operator/pkg/stub\"\n\tsdk \"github.com/operator-framework/operator-sdk/pkg/sdk\"\n\tsdkVersion \"github.com/operator-framework/operator-sdk/v...
go
edit
0
1
apache-2.0
426b9479126683191fa286f6f55450b1e10b68ae
banzaicloud/bank-vaults,banzaicloud/bank-vaults
operator/cmd/vault-operator/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/codegangsta/martini\"\n\t\"github.com/codegangsta/martini-contrib/render\"\n)\n\nfunc main() {\n m := martini.Classic()\n m.Use(render.Renderer())\n\n m.Get(\"/\", func() string {\n retur...
go
edit
9
2
mit
8060673a31c99276896618c0e62714b107404c84
xasos/Christmas
app.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build linux freebsd solaris\n\npackage builtin\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/docker/libnetwork/datastore\"\n\t\"github.com/docker/libnetwork/ipam\"\n\t\"github.com/docker/libnetwork/ipamapi\"\n\t\"github.com/docker/libnetwork/ipa...
go
edit
0
6
apache-2.0
64a2d2a3a2234a80b16081958b9dd2cfaad606eb
cpuguy83/docker,moby/moby,flavio/docker,AkihiroSuda/docker,Ramzec/docker,nalind/docker,paralin/docker,paralin/docker,docker/docker,nalind/docker,nawawi/docker,cpuguy83/docker,cpuguy83/docker,jthelin/docker,Mokolea/docker,jameszhan/docker,vdemeester/docker,moby/moby,yosifkit/docker,konstruktoid/docker-upstream,mahak/doc...
libnetwork/ipams/builtin/builtin_unix.go
rejected_duplicate
Near-duplicate of sample 117879
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Code generated by protoc-gen-gogo.\n// source: uuid.proto\n// DO NOT EDIT!\n\npackage events\n\nimport proto \"github.com/gogo/protobuf/proto\"\nimport math \"math\"\n\n// Reference imports to suppress errors if they are not otherwise used.\...
go
edit
0
3
apache-2.0
426a5b361c3846b006889462a4d80290e7dd70f6
cloudfoundry/noaa,cloudfoundry/noaa
events/uuid.pb.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage TF2RconWrapper\n\ntype Player struct {\n\tUserID string\n\tUsername string\n\tSteamID string\n\tPing int\n\tState string\n\tIp string\n}\n\n```\n\nApply this change: Comment out ping and state fields (for now)" }, { ...
go
edit
0
0
mit
a73298789497065a8581142160d97533e4c76735
TF2Stadium/TF2RconWrapper
player.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package go-oui provides functions to work with MAC and OUI's\npackage ouitools\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"testing\"\n)\n\nfunc Test(*testing.T) {\n\td := &OuiDb{}\n\terr := d.Load(\"oui.txt\")\n\n\tif err != nil {\n\t\tlog.Fatal(...
go
edit
12
2
mit
39ee639934ece9a764d4191b4d90f93dc9044d3f
dutchcoders/go-ouitools,cmatsuoka/ouidb
ouitools_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2016 Mirantis\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/licenses/LI...
go
edit
0
0
apache-2.0
b88d00beea94ab3aaf3f25e9c34f9433584e0b4e
Mirantis/virtlet,vefimova/virtlet,vefimova/virtlet,Mirantis/virtlet,nhlfr/virtlet,vefimova/virtlet,nhlfr/virtlet,vefimova/virtlet,nhlfr/virtlet,nhlfr/virtlet
tests/integration/vars.go
accepted
null
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\"github.com/cloudfoundry-incubator/cf-test-helpers/generator\"\n\n\t\"time\"\n\n\t\"github.com/cloudfoundr...
go
edit
24
2
apache-2.0
eb3f64578a364957cc342f9dc73a54cde948900f
cloudfoundry-incubator/bits-service-release,cloudfoundry-incubator/bits-service-release,cloudfoundry-incubator/bits-service-release,cloudfoundry-incubator/bits-service-release
src/github.com/cloudfoundry-incubator/bits-service-performance-tests/app_push_test.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\"fmt\"\n\t\"io\"\n\t\"os\"\n)\n\nvar ARGV []string\n\nfunc main() {\n\tARGV = os.Args[1:]\n\n\t// If there are no arguments, then we read STDIN\n\tif len(ARGV) == 0 {\n\t\tARGV = append(ARGV, \"-\")\n\t}\n\n\t// Ite...
go
edit
3
5
mit
fb0fbdd9a6959c5fd729a1d64d07474297174b4c
caius/gocat
gocat.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage hexToBase64\n\nimport \"testing\"\n\nfunc TestHexToBase64(t *testing.T) {\n\tcases := []struct {\n\t\tin, want string\n\t\tfails bool\n\t}{\n\t\t{\n\t\t\t\"49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f757...
go
edit
3
5
mit
002dd3ffcf9bc730bc15f8aa62291b61735cd08e
eseymour/cryptopals
set1/challenge01/hexToBase64/hexToBase64_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage backends\n\ntype FileStore interface {\n\t// create new file at path\n\tCreateFile(path string, content []byte) (err error)\n\n\t// update existing file at path\n\tUpdateFile(path string, content []byte) (err error)\n\n\t// create dir a...
go
edit
0
0
mit
1df89be624ae8c286ba36f203ec9d76e419ffd55
Marktown/frontend,Marktown/frontend,Marktown/frontend
backends/file_store.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Challenge 46 - RSA parity oracle\n// http://cryptopals.com/sets/6/challenges/46\n\npackage cryptopals\n\nimport \"math/big\"\n\ntype challenge46 struct {\n}\n\ntype parityOracleServer struct {\n\tpriv privateKey\n}\n\nfunc (server *parityOra...
go
edit
6
3
mit
2f1cdf25d84bb02018bca7afa3511b543dd5fea0
Metalnem/cryptopals-go,Metalnem/cryptopals-go,Metalnem/cryptopals-go
challenge46.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage state\n\nimport (\n\t\"os\"\n\t\"testing\"\n)\n\nfunc TestKVStore(t *testing.T) {\n\tkv := KVStore{\n\t\tDbFileName: \"test.db\",\n\t\tBucketName: \"Test\",\n\t}\n\tkv.Init()\n\tdefer kv.Close()\n\n\terr := kv.Set([]byte(\"foo\"), []byt...
go
edit
3
4
mit
b2f43945768d7ef24b8cad9666f0a06f0141e8f7
patrobinson/go-fish,patrobinson/go-fish
state/kv_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage util\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/rs/cors\"\n)\n\n// NewCorsHandler creates a new http.Handler to support CORS\nfunc NewCorsHandler(handler http.Handler, allowOrigins []string) http.Handler {\n\tmw := cors.New(cors.Opti...
go
edit
0
1
mit
1ca9abdcc6d3b9ef9e0afb2125b64ee52fe2ff09
torinos-io/api,torinos-io/api
server/util/cors_handler.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage middlewares\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/freeusd/solebtc/Godeps/_workspace/src/github.com/gin-gonic/gin\"\n\t\"github.com/freeusd/solebtc/errors\"\n\t\"github.com/freeusd/solebtc/models\"\n)\n\ntype authRequ...
go
edit
0
5
mit
6f800847ea136c66c6a39c05652e97302200a9f1
solefaucet/sole-server,freeusd/solebtc,freeusd/solebtc,solefaucet/sole-server,solefaucet/sole-server,freeusd/solebtc
middlewares/auth_required.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (C) 2017 Damon Revoe. All rights reserved.\n// Use of this source code is governed by the MIT\n// license, which can be found in the LICENSE file.\n\npackage main\n\nfunc listPackages(workspacedir, pkgpath string) error {\n\tpackag...
go
edit
15
2
mit
dc3762a5bcfe060acc06d923ea52ccf5058a271a
revl/autoforge
listcmd.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n \"html/template\"\n \"log\"\n \"net/http\"\n)\n\ntype Blog struct {\n Articles map[string]*Article\n}\n\nfunc (b *Blog) getArticle(slug string) *Article {\n if article := b.Articles[slug]; article != nil {\n r...
go
edit
9
2
mit
94920c2b147df8eea7bf4cd1c5fad77c17993bda
andrielfn/blogo
app.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dom\n\n/*\n * Implements a very small, very non-compliant subset of the DOM Core Level 2\n */\n\n// DOM2: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247\ntype Node interface {\n NodeName() string;\n}\n\n// DOM2: http://w...
go
edit
0
1
bsd-3-clause
32ac2e259597f8fad2fda3a85de7ca6ed408be64
ErfanAkbarimanesh/godom,grmartin/godom,grmartin/godom,ErfanAkbarimanesh/godom
dom.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage schema\n\nimport \"time\"\n\ntype Service struct {\n\tID string `gorethink:\"id\"`\n\tName string `gorethink:\"name\"`\n\tType string `gorethink:\"_type\"`\n\tCurrent bool `gorethink:\"current\"`\n\tCTime time...
go
edit
0
0
apache-2.0
d436c4dc053d8e690179fe8dafdccef86d5f1fd8
a2sdl/etcfs
pkg/db/schema/schema.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n//go:build !windows && !plan9 && !js\n\npackage shell\n\nimport (\n\t\"strings\"\n\t\"syscall\"\n\t\"testing\"\n\n\t\"src.elv.sh/pkg/must\"\n\t. \"src.elv.sh/pkg/prog/progtest\"\n\t\"src.elv.sh/pkg/testutil\"\n)\n\nfunc TestSignal_USR1(t *testi...
go
edit
0
2
bsd-2-clause
b47f8e0dc217f7eedc855e69f621d1a259c430e8
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
pkg/shell/shell_unix_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage repo\n\ntype Identity struct {\n\tName string\n\tEmail string\n}\n\nfunc (i *Identity) hasName() bool {\n\treturn i.Name != \"\"\n}\n\nfunc (i *Identity) hasEmail() bool {\n\treturn i.Email != \"\"\n}\n\nfunc (i *Identity) String() str...
go
edit
0
3
mit
c367a94e343af3027592a2fb9b9bbeb55ea663aa
prydonius/karn,howdoicomputer/karn
repo/identity.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Define helper / mock for unit testing\n//\n// Because golang likes return error object instead of exception/panic,\n// always handle error return values is a good practise. But sometimes it is\n// impossible to got error, such as read from m...
go
edit
0
3
apache-2.0
f41f372d5a6c29f279f1e3e8901e531e6c5c3c8b
redforks/testing
pkg.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2014 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\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"log\"\n\t\"os\"\n)\n\n//go:ge...
go
edit
0
2
apache-2.0
3da4e90d4393be281cf409bead9aa3860415a87b
daved/jsonenums,daved/jsonenums,matryer/jsonenums,matryer/jsonenums,campoy/jsonenums,campoy/jsonenums
example/shirtsize.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// See LICENSE.txt for licensing information.\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\nvar (\n\tSPINNER_STRINGS = []string{\"◢ \", \"◣ \", \"◤ \", \"◥ \"}\n\tSPINNER_LEN = len(SPINNER_STRINGS)\n)\n\ntype Spinner struct {\...
go
edit
0
2
bsd-2-clause
e6190f0d7fc44b4fd5e94da972142604a6142575
drbig/saver
spinner.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage configuration\n\nimport (\n\t\"flag\"\n\t\"log\"\n\n\t\"github.com/FogCreek/mini\"\n)\n\ntype iagoConfiguration struct {\n\tHostname string\n\tProtocol string\n\tPort string\n\tPath string\n}\n\nvar (\n\tIago iagoConfiguration\n...
go
edit
9
5
unlicense
8ece3997df405eff6df0120a7d3d7b24bf4ec3a2
citruspi/milou
configuration/configuration.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage desugar\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n\t\"github.com/tisp-lang/tisp/src/lib/ast\"\n)\n\nfunc TestNamesFind(t *testing.T) {\n\tn := \"x\"\n\tassert.True(t, newNames(n).find(ast.NewLetVar(n, n)).i...
go
edit
6
2
mit
912e0b466c04e4ff48bca46f454a75192431fd7e
raviqqe/tisp,tisp-lang/tisp,tisp-lang/tisp,raviqqe/tisp,raviqqe/tisp
src/lib/desugar/names_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ziputils\n\nimport (\n\t. \"github.com/francoishill/golang-web-dry/errors/checkerror\"\n\t\"io\"\n\t\"os\"\n)\n\nfunc SaveReaderToFile(logger SimpleLogger, bodyReader io.Reader, saveFilePath string) {\n\tout, err := os.Create(saveFilePa...
go
edit
12
2
mit
96b0edfec51e03d24cd78c8d661d1401b04cd686
francoishill/golang-web-dry
zip/ziputils/SaveReaderToFile.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage clean\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/littledot/mockhiato/lib\"\n\t\"github.com/littledot/mockhiato/lib/plugin/github.com/stretchr/testify\"\n)\n\n// Run executes the command.\nfunc...
go
edit
0
6
apache-2.0
ddc800d8efad8a5be5fa8f329f4ce261b9b79330
littledot/mockhiato,littledot/mockhiato
lib/clean/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"net/http\"\n\t\"time\"\n\n\t\"github.com/influxdata/chronograf\"\n)\n\n// Logger is middleware that logs the request\nfunc Logger(logger chronograf.Logger, next http.Handler) http.Handler {\n\tfn := func(w http.R...
go
edit
0
1
mit
ee5760bfd3a58d7d45a9cb3c2a12bd9232df96bc
mark-rushakoff/influxdb,nooproblem/influxdb,influxdb/influxdb,influxdb/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rushakoff/influxdb,li-ang/influxdb,li-ang/influxdb,influxdb/influxdb,mark-rushakoff/influxdb,influxdb/influxdb,nooproblem/influxdb,influxdata/influxdb,influxdb/influxdb,nooproblem/influxdb,mark-rus...
server/logger.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage redis\n\nimport (\n\t\"github.com/DMarby/picsum-photos/cache\"\n\t\"github.com/mediocregopher/radix/v3\"\n)\n\n// Provider implements a redis cache\ntype Provider struct {\n\tpool *radix.Pool\n}\n\n// New returns a new Provider instance...
go
edit
9
3
mit
53718c8c91135a823c28eac05c73269fe6491df3
DMarby/unsplash-it,DMarby/unsplash-it
cache/redis/redis.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\"io/ioutil\"\n)\n\n// Reader defines an interface that implements the\n// methods to read files from some resource and translate\n// it to File instances\ntype Reader interface {\n\tRead(path string) ([]File, error)...
go
edit
9
5
mit
44598ef2a9f1dc8051ab8dd256e7dde1921088cb
mauricioklein/text-search-engine
loader.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage lexer\n\ntype Lexer struct {\n\tinput string\n\tposition int // current position in input (points to current char)\n\treadPosition int // current reading position in input (after current char)\n\tch byte // curren...
go
edit
0
10
mit
045e5f482cfb44bd40ca0750d8ff67bbaabd5fbc
vkandola/go-go-gadget,vkandola/go-go-gadget
src/gadget/lexer/lexer.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage router\n\nconst (\n\tFS_STATIC = \"static\"\n\tFS_UPLOAD_DROPLET = \"upload_droplet\"\n\tFS_UPLOAD_BUILD_ARTIFACTS = \"upload_build_artifacts\"\n\tFS_DOWNLOAD_BUILD_ARTIFACTS = \"download_build_artifacts\"\...
go
edit
15
1
apache-2.0
1f6334fbefad5da5ca72fa0df4abb69ba5e62026
cloudfoundry-incubator/runtime-schema
router/file_server_routes.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage auth\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"github.com/gorilla/mux\"\n\t\"net/http\"\n)\n\nconst (\n\ttokenCookieName = \"access_token\"\n)\n\nfunc AddRoutes(r *mux.Router, service Service) {\n\t// Explicitly only serve login ...
go
edit
6
4
mit
7fec1ff26cc47f08782af65831815339014d49d1
DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website,DiscoViking/website
server/auth/handler.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage day4\n\nimport (\n\t\"strings\"\n\n\t\"github.com/domdavis/adventofcode/2016/day4/room\"\n)\n\nfunc Solution() string {\n\treturn \"Not yet solved\"\n}\n\nfunc sum(input string) int {\n\ttotal := 0\n\tfor _, code := range strings.Split(...
go
edit
3
3
mit
b989262d9912c6c9df2a32d561dcc8e554704dfc
domdavis/adventofcode
2016/day4/day4.go
accepted
null
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/bwmarrin/discordgo\"\n)\n\nconst commandPrefix = `$`\n\nfunc messageCreateHandler(s *discordgo.Session, m *discordgo.MessageCreate) {\n\n\tuser, _ := s.User(\"@me\")\n\tif m.A...
go
edit
0
7
bsd-3-clause
362751ba24ee4a5efc5895981d0c032d0baaa889
kori-irrlicht/irrlicht-bot
commands.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\"). You may\n// not use this file except in compliance with the License. A copy of the\n// Lic...
go
edit
9
2
apache-2.0
df56314b95e3c8bf44bc17de7d35038843bb71bd
aws/amazon-ecs-agent,aws/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent,aws/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent,aws/amazon-ecs-agent,kiranmeduri/amazon-ecs-agent,swipely/amazon-ecs-agent
agent/logger/seelog_config.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage schedule\n\nimport \"time\"\n\ntype ConstantSchedule struct {\n\tInterval time.Duration\n}\n\nfunc Every(duration time.Duration) ConstantSchedule {\n\tif duration < time.Second {\n\t\tduration = time.Second\n\t}\n\tduration = duration -...
go
edit
0
2
mit
a70001d541e491b213865e7821ef9555e0bf331f
celrenheit/spider
schedule/constant.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"testing\"\n\t\"time\"\n)\n\nfunc TestParseTime(t *testing.T) {\n\n\tmessage := []byte{0x24, 0x4b, 0xbb, 0x9a, 0xc9, 0xf0}\n\tutcDate := time.Now().UTC()\n\n\twanted := time.Date(utcDate.Year(), utcDate.Month(), utc...
go
edit
6
2
bsd-3-clause
74934f0aa59141418ee8346d26eba9f36ed2fae3
mafonso/go1090
parseTime_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Keybase, Inc. All rights reserved. Use of\n// this source code is governed by the included BSD license.\n\n// +build !darwin,!android\n\npackage libkb\n\nimport \"os\"\n\nfunc NewSecretStoreAll(g *GlobalContext) SecretStoreAll...
go
edit
0
1
bsd-3-clause
843949d477ac9d038a4a320c005e0b58ed5c052b
keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client,keybase/client
go/libkb/secret_store_other.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage wall_street_test\n\nimport (\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Wall Street\", func() {\n\tIt(\"is not fully implemented\", func() {\n\t\tExpect(true).To(BeFalse())\n\t})\n})\n\n```\...
go
edit
12
1
mit
e64d309c09406a91de28a52767d5eae99dec5218
tjarratt/wall_street
wall_street_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"github.com/prometheus/client_golang/prometheus\"\n)\n\nvar (\n\tRedirectHandlerRedirectCountMetric = prometheus.NewCounterVec(\n\t\tprometheus.CounterOpts{\n\t\t\tName: \"router_redirect_handler_redirect_total\...
go
edit
0
1
mit
941d11815088934c10a4e17066dcaeb432e54a90
alphagov/router
handlers/metrics.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage interceptor\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/require\"\n)\n\nfunc TestSanitizeIPTablesOutput(t *testing.T) {\n\trequire.Equal(t, \"x y\", sanitizeIPTablesOutput(([]byte)(\"x\\n\\ty\")))\n\n\tas := make([]by...
go
edit
6
1
apache-2.0
dd3474ed0b0a3e7f1f1d7bd7e978e3709202ea13
squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen,squaremo/ambergreen
balancer/interceptor/iptables_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage fakes\n\nimport boshsys \"github.com/cloudfoundry/bosh-utils/system\"\n\ntype FakePSRunner struct {\n\tRunCommands []boshsys.PSCommand\n\tRunCommandErr error\n}\n\nfunc NewFakePSRunner() *FakePSRunner {\n\treturn &FakePSRunner{\n\t\tR...
go
edit
0
2
apache-2.0
0a3f4daa47c97f8ceef5662839364c4c8b2f041a
cloudfoundry/bosh-utils,cloudfoundry/bosh-utils
system/fakes/fake_ps_runner.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage eventnotifier\n\nimport (\n\t\"net/http\"\n\t\"sync\"\n\n\t\"github.com/Symantec/Dominator/lib/log\"\n\t\"github.com/Symantec/keymaster/proto/eventmon\"\n)\n\ntype EventNotifier struct {\n\tlogger log.DebugLogger\n\tmutex sync.Mutex\n\...
go
edit
18
1
apache-2.0
f7d8fc8f104bd954cfd22cf9a6ae5514f1c8190b
rgooch/keymaster,Symantec/keymaster,Symantec/keymaster,rgooch/keymaster,rgooch/keymaster,Symantec/keymaster
keymasterd/eventnotifier/api.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage agent\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/AdRoll/goamz/aws\"\n\t\"github.com/AdRoll/goamz/ec2\"\n)\n\ntype EC2Tags struct {\n}\n\nfunc (e EC2Tags) Get() (map[string]string, error) {\n\ttags := make(map[str...
go
edit
0
4
mit
ed53a4d49900d79117f1e631266d010e37eca1fc
Shopify/agent,Shopify/agent,buildkite/agent,buildkite/agent,Shopify/agent,buildkite/agent
agent/ec2_tags.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/cburkert/go-statusbar/reporters/battery\"\n\t\"github.com/cburkert/go-statusbar/reporters/volume\"\n)\n\nfunc main() {\n\tstatusBar := NewStatusBar(\" | \")\n\tstatusBar.AddReporter(volume.NewVolumeRepor...
go
edit
6
1
bsd-3-clause
dfddf7caabcf09ae326b36088c0f1c8eb24e1f3c
cburkert/go-statusbar,cburkert/go-statusbar
go-statusbar.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage common\n\n// Radical represents possible radical configurations of an atom.\ntype Radical uint8\n\nconst (\n\tRadicalNone Radical = 0\n\tRadicalSinglet\n\tRadicalDoublet\n\tRadicalTriplet\n)\n\n// BondType defines the possible types of ...
go
edit
0
0
mit
0617eaf0de27bd30c0dc1a3b78e6a1c9d2aeaa25
js-ojus/RxnWeaver,RxnWeaver/RxnWeaver
common/enums.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage flow\n\nimport (\n\t\"testing\"\n)\n\ntype doubleOnce struct {\n\tIn <-chan int\n\tOut chan<- int\n}\n\nfunc (c *doubleOnce) Process() {\n\ti := <-c.In\n\tc.Out <- 2*i\n}\n\nfunc TestSimpleComponent(t *testing.T) {\n\tin := make(chan in...
go
edit
6
3
mit
252b3c6a8a49b2d9457ae9e2c335970aef2d6753
trustmaster/goflow,trustmaster/goflow
component_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage fibgo\n\nvar cache = make(map[int]int)\n\n// N return fibonacci number on N position\n// N should start from 0, otherwise panic will raised\nfunc N(n int) int {\n\tif n < 0 {\n\t\tpanic(\"n should not less than 0\")\n\t}\n\n\tv, ok := c...
go
edit
0
4
mit
bef4a60c68cd3be9809f889d8d9c13cfe8f7e3d5
uudashr/fibgo
fib.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage systemd_test\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/mistifyio/mistify/acomm\"\n\t\"github.com/mistifyio/mistify/providers/systemd\"\n)\n\nfunc (s *sd) TestGet() {\n\ttests := []struct {\n\t\tname string\n\t\terr string\n\t}{\n\t\t{\"...
go
edit
3
6
mit
28afc405b0337cc38902be8d70ba3366c58608f0
mistifyio/mistify,cerana/cerana,cerana/cerana,cerana/cerana,cerana/cerana
providers/systemd/get_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage options\n\nimport \"time\"\n\nconst DEFAULT_MAX_RETRY_ATTEMPTS = 3\nconst DEFAULT_SLEEP = 5 * time.Second\n\n// List of recurring transient errors encountered when calling terraform\n// If any of these match, we'll retry the command\nva...
go
edit
0
0
mit
71a857fa516acd9a40c16e549c007035f298f500
gruntwork-io/terragrunt,gruntwork-io/terragrunt
options/auto_retry_options.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage runtime\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"reflect\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\t\"github.com/golang/protobuf/proto\"\n)\n\n// Decode decodes the specified val into the specified target.\nfunc Decode(targ...
go
edit
0
5
mit
fb07c82fbcb3627df2f688b7e0cdb0d1f6f80b44
AmandaCameron/protoc-gen-gokit
runtime/decode.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"net\"\n\n\t\"github.com/hnakamur/rdirsync\"\n\n\t\"google.golang.org/grpc\"\n\t\"google.golang.org/grpc/credentials\"\n\t\"google.golang.org/grpc/grpclog\"\n)\n\nfunc main() {\n\tvar enableTLS bool\n\tf...
go
edit
0
4
mit
22124d4359bfecb726ab2366245583f0b0e12f18
hnakamur/rdirsync
cmd/server/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage router\n\nimport(\n \"github.com/ricallinson/forgery\"\n \"github.com/spacedock-io/registry/images\"\n \"github.com/spacedock-io/registry/repositories\"\n \"github.com/spacedock-io/registry/auth\"\n)\n\nfunc Routes(server *f.Server)...
go
edit
9
1
mit
306ae40d485c7e19d9fb747c9109204af140e72f
spacedock-io/registry
router/router.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage routes\n\nimport (\n\t\"encoding/json\"\n\t\"net/http\"\n)\n\ntype Arguments map[interface{}]interface{}\n\ntype Handler func(*http.Request, Arguments) (int, interface{})\n\ntype IntermediateHandler func(http.ResponseWriter, *http.Reque...
go
edit
3
2
apache-2.0
d57f1a6248cf3313dc97f69d3d5f5feb46ce59e1
trackit/trackit,trackit/trackit,trackit/trackit
routes/routes.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Package reflect adds some useful features to the standard reflect package.\npackage reflect\n\nimport \"reflect\"\n\n// IsDefined checks if the value is different from nil looking further to its\n// contents.\nfunc IsDefined(value interface{...
go
edit
0
4
mit
7eb6028b28527a869d6c680867303c1edf3f36f4
registrobr/gostk
reflect/reflect.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage db\n\nimport (\n\t\"github.com/garyburd/redigo/redis\"\n)\n\n// Save takes a key (struct used as template for all data containers to ease the managing of the DB)\n// and generates an unique key in order to add the record to the DB.\nfun...
go
edit
9
1
mit
6695c8a521ec0e8908b691da2d746a79c51128f1
WarCluster/warcluster-server,WarCluster/warcluster-server
entities/db/commands.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage nigronimgosession\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/gorilla/context\"\n\tmgo \"gopkg.in/mgo.v2\"\n)\n\ntype DatabaseAccessor struct {\n\t*mgo.Session\n\turl string\n\tname string\n}\n\nfunc NewDatabaseAccessor(url, name, st...
go
edit
0
2
mit
316208bf23abed1623b2c229884b98fcec482f82
joeljames/nigroni-mgo-session
database_accessor.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sentry\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"runtime/debug\"\n\n\t\"github.com/getsentry/raven-go\"\n\t\"github.com/gin-gonic/gin\"\n)\n\nfunc Recovery(client *raven.Client, onlyCrashes bool) gin.HandlerFunc {\n\n\tr...
go
edit
9
4
mit
43da41826b4d1ca50d8fa3a218032c380ef4423f
gin-contrib/cache,gin-contrib/cache
sentry/recovery.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\"math/rand\"\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 = 250000\n\nfunc TestCloudWatchAdapter(t *testing.T) {\n...
go
edit
6
4
mit
f68cf915047c362711b71917751d1d6fb8598138
bradgignac/logspout-cloudwatch,bradgignac/logspout-cloudwatch
cloudwatch_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/s3git/s3git-go\"\n\t\"strings\"\n)\n\nfunc main() {\n\trepo, _ := s3git.InitRepository(\".\")\n\n\trepo.Add(strings.NewReader(\"hello s3git\"))\n\n\trepo.Commit(\"Initial commit\")\n\n\tlist, ...
go
edit
3
2
apache-2.0
76ac0c57a1a7c0b085552a48f89705cb52552b5d
s3git/s3git-go
examples/create.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cues\n\nimport (\n\t\"errors\"\n)\n\ntype CueList struct {\n\tCues []Cue\n}\n\nfunc (cueList CueList) ConvertCues() (string, error) {\n\tvar err error\n\tret := \"Ident 3:0\\r\\nClear Cues\\r\\n\"\n\n\tif cueList.Cues != nil {\n\t\tfor ...
go
edit
3
3
mit
3ae3529f751f8934d2dbca765ff8cb897882c632
woz5999/CueDescriptionsToASCII,woz5999/CueDescriptionsToASCII,woz5999/CueDescriptionsToASCII
cues/cueList.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage chuper\n\nimport (\n\t\"net/url\"\n\n\t\"github.com/PuerkitoBio/fetchbot\"\n)\n\ntype Context struct {\n\t*fetchbot.Context\n\tCache Cache\n}\n\nfunc (c *Context) SourceURL() *url.URL {\n\tswitch cmd := c.Cmd.(type) {\n\tcase Cmd:\n\t\t...
go
edit
15
2
bsd-3-clause
0a60f16853d284840a996c695ca621519ad32724
oli-g/chuper,sluceno/chuper
context.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport ()\n\nfunc ExampleCliNoArguments() {\n\trepos := map[string]Repo{\n\t\t\"zathura\": Repo{},\n\t\t\"test\": Repo{},\n\t\t\"gamma\": Repo{},\n\t}\n\n\tapp := BuildCLI(repos, Config{})\n\targs := make([]string, 1)\n\n\t...
go
edit
0
0
mit
5300c55a73f678fda2830a9909c8df1c55b257b2
thiderman/sagacity
cli_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/itsankoff/gotcha/client\"\n\t\"github.com/itsankoff/gotcha/common\"\n\t\"log\"\n\t\"time\"\n)\n\nfunc main() {\n\tinput := make(chan *common.Message)\n\tws := client.NewWebSocketClient()\n\tws.SetReceive...
go
edit
0
1
mit
c8cf4af9674e1d4eb0747ba32be38d9849b74ab1
itsankoff/gotcha,itsankoff/gotcha
cmd/client/main.go
accepted
null
true