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 schemas\n\n// This method takes the topic name as a parameter\n// and determines the struct to return as a schema.\nfunc IdentifySchema(topicName string) interface{} {\n switch topicName {\n case \"tx-closed\":\n return &...
go
edit
21
8
mit
d8c31c9199e354c0af050736836af6ca765f2ee5
companieshouse/kafka-management-tool
schemas/schemas.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage coverage_fixture\n\nfunc A() string {\n\treturn \"A\"\n}\n\nfunc B() string {\n\treturn \"B\"\n}\n\nfunc C() string {\n\treturn \"C\"\n}\n\nfunc D() string {\n\treturn \"D\"\n}\n\nfunc E() string {\n\treturn \"untested\"\n}\n\n```\n\nAp...
go
edit
0
1
mit
e37dbfeeb30815fe82b51c633097e1d62bbed874
onsi/ginkgo,onsi/ginkgo
integration/_fixtures/coverage_fixture/coverage.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage ast\n\ntype Output struct {\n\texpr interface{}\n}\n\nfunc NewOutput(expr interface{}) Output {\n\treturn Output{expr}\n}\n\nfunc (o Output) Expr() interface{} {\n\treturn o.expr\n}\n\n```\n\nApply this change: Add expanded property to ...
go
edit
0
1
mit
768abf16229eb021af66f57739880a62367101b0
raviqqe/tisp,tisp-lang/tisp,tisp-lang/tisp,raviqqe/tisp,raviqqe/tisp
src/lib/ast/output.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\tC Cache\n}\n\nfunc (c *Context) SourceURL() *url.URL {\n\tswitch cmd := c.Cmd.(type) {\n\tcase Cmd:\n\t\tretu...
go
edit
6
2
bsd-3-clause
341b0dbec1f637d27b52830c15d36f846c1db3e8
sluceno/chuper,oli-g/chuper
context.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stripper_test\n\nimport (\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/docker-library/go-dockerlibrary/pkg/stripper\"\n)\n\nfunc ExampleCommentStripper() {\n\tr := strings.NewReader(`\n# opening comment\na: b\n# comment!\nc: d #...
go
edit
0
1
apache-2.0
273a3770eb2085336d65a2584b5d792a3493016c
docker-library/go-dockerlibrary
pkg/stripper/comments_example_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rpcd\n\nimport (\n\t\"github.com/Symantec/Dominator/lib/srpc\"\n\t\"github.com/Symantec/Dominator/proto/imageserver\"\n)\n\nfunc (t *srpcType) GetImage(conn *srpc.Conn,\n\trequest imageserver.GetImageRequest,\n\treply *imageserver.GetIm...
go
edit
3
8
apache-2.0
f0ea8147f57c810e8bfe32d3a7e103d1e333d8bb
rgooch/Dominator,keep94/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator,Symantec/Dominator,rgooch/Dominator
imageserver/rpcd/getImage.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"html\"\n\t\"net/http\"\n)\n\nfunc serve1() {\n\thttp.HandleFunc(\"/user\", func(w http.ResponseWriter, r *http.Request) {\n\t\tr.ParseForm()\n\t\tusername := r.Form.Get(\"username\")\n\t\tif !isValidUser...
go
edit
3
2
mit
7adf477e2d5ca17a04b47f66b335dc94b5ff3665
github/codeql,github/codeql-go,github/codeql,github/codeql-go,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql-go,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql-go
ql/test/query-tests/Security/CWE-079/ReflectedXssGood.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage util\n\nimport (\n\t\"fmt\"\n\t\"time\"\n)\n\n// TimeoutError is error returned after timeout occured.\ntype TimeoutError struct {\n\tafter time.Duration\n}\n\n// Error implements the Go error interface.\nfunc (t *TimeoutError) Error() ...
go
edit
0
3
apache-2.0
2252004e8c6c3fa3bdeb3dfdbda671f4f4e6a7b7
mfojtik/source-to-image,guangxuli/source-to-image,php-coder/source-to-image,liggitt/source-to-image,shrutikamendhe/source-to-image,gabemontero/source-to-image,bparees/source-to-image,liggitt/source-to-image,openshift/source-to-image,rhcarvalho/source-to-image,PI-Victor/source-to-image,guangxuli/source-to-image,php-code...
pkg/util/timeout.go
rejected_duplicate
Near-duplicate of sample 118198
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sentry\n\nimport (\n\t\"errors\"\n\t\"log\"\n\t\"strings\"\n\n\t\"github.com/hashicorp/terraform-plugin-sdk/helper/schema\"\n)\n\nfunc resourceSentryTeamImport(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {\...
go
edit
0
2
mit
0cb149b277c07799fee1a5d38d633cba772ea9d4
jianyuan/terraform-provider-sentry
sentry/import_sentry_team.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 The Vanadium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// THIS FILE IS DEPRECATED!!!\n// Please edit the new \"jiri\" tool in rel...
go
edit
0
4
bsd-3-clause
e3dd8d343a8a6cd96dfc6fd9c794bae8ea0b833f
vanadium/go.devtools,vanadium/go.devtools,vanadium/go.devtools
v23/cmd.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage libgodelbrot\n\n\ntype RedscalePalette CachePalette\n\nfunc NewRedscalePalette(iterateLimit uint8) RedscalePalette {\n return NewCachePalette(iterateLimit, &redscaleCacher)\n}\n\n// Cache redscale colour values\nfunc redscaleCacher(l...
go
edit
12
1
mit
6af6e599525d539aa15564e37dae2da9534286b7
johnny-morrice/webdelbrot-static,johnny-morrice/webdelbrot,johnny-morrice/godelbrot,johnny-morrice/webdelbrot,johnny-morrice/webdelbrot-static
src/functorama.com/demo/libgodelbrot/redscale.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage exp14\n\nimport (\n\t. \"gist.github.com/7480523.git\"\n\t. \"gist.github.com/7802150.git\"\n\n\t\"gist.github.com/8018045.git\"\n)\n\ntype GoPackages struct {\n\tEntries []*GoPackage\n\n\tDepNode2\n}\n\nfunc (this *GoPackages) Update()...
go
edit
0
4
mit
3cdef47ac75e0e12c2bf95e63ab8eb0d5012181d
shurcooL/go
exp/14/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2017 The WPT Dashboard Project. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\npackage webapp\n\nimport (\n\t\"html/template\"\n\t\"net/http\"\n)\n\...
go
edit
21
1
apache-2.0
74023cdb8a3fda1f02405d2a7bed29204c174425
GoogleChrome/wptdashboard,GoogleChrome/wptdashboard,GoogleChrome/wptdashboard
webapp/main.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage actors\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n)\n\ntype BOSHCLI struct{}\n\nfunc NewBOSHCLI() BOSHCLI {\n\treturn BOSHCLI{}\n}\n\nfunc (BOSHCLI) DirectorExists(address, caCertPath string) (bool, error) {\n\t_, err := exec.Command(\"bosh...
go
edit
0
1
apache-2.0
4b0c210cef50437844302f2a98292c68793a1144
niroyb/bosh-bootloader,pivotal-cf-experimental/bosh-bootloader,pivotal-cf-experimental/bosh-bootloader,niroyb/bosh-bootloader
integration-test/actors/boshcli.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\t\"text/template\"\n\n\t\"github.com/rollbrettler/daily-stars/stars\"\n)\n\nvar port string\n\nfunc init() {\n\tflag.StringVar(&port, \"port\", \":8...
go
edit
0
2
mit
526e8d765a8fcaed0241be65b95bd757aa061fd6
rollbrettler/daily-stars
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\"time\"\n\n\t\"github.com/yamnikov-oleg/avamon-bot/monitor\"\n)\n\nfunc main() {\n\ttimeout := flag.Duration(\"timeout\", 3*time.Second, \"Timeout for network request\")\n\n\tflag.Parse()\n\n\...
go
edit
0
2
mit
e8881d28fe3257f651c6a42902924840ca5e8607
yamnikov-oleg/avamon-bot,yamnikov-oleg/avamon-bot
monitor/bin/avamon-poll/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"log\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path\"\n)\n\t\nfunc buildinit() {\n\te := os.Environ()\n\tfor i := range e {\n\t\tif e[i][0:6] == \"GOPATH\" {\n\t\t\te[i] = e[i] + \":\" + path.Join(config.Uroot, \"src/bb/bbsh\...
go
edit
6
4
bsd-3-clause
bae1161b3393b1b4aa87527bc2adb88f933410f2
rminnich/u-root,GanShun/u-root,hugelgupf/u-root,rminnich/u-root,u-root/u-root,hugelgupf/u-root,hugelgupf/u-root,hugelgupf/u-root,u-root/u-root,GanShun/u-root,GanShun/u-root,u-root/u-root,rminnich/u-root,rminnich/u-root
src/bb/buildinit.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage rds\n\nimport (\n\t\"github.com/jagregory/cfval/constraints\"\n\t\"github.com/jagregory/cfval/resources/common\"\n\t. \"github.com/jagregory/cfval/schema\"\n)\n\n// see: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-...
go
edit
24
0
mit
297dd000cad23a2416a40be48c86d58dc3ab8d2c
jagregory/cfval,jagregory/cfval
resources/rds/db_subnet_group.go
rejected_lint
Too many lint violations: 24
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage server_test\n\nimport (\n\t\"code.cloudfoundry.org/garden/client\"\n\t\"code.cloudfoundry.org/garden/client/connection\"\n\t\"code.cloudfoundry.org/garden/server\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n\n\t\"t...
go
edit
18
1
apache-2.0
e0f4429387f46ea32bc58f5ee852959156fef27d
cloudfoundry-incubator/garden,cloudfoundry-incubator/garden
server/server_suite_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*Package consts implements constants for the entire project\n */\npackage consts\n\nconst DefaultUserName = \"Thor\"\n\n// VisibleFlag is the constant given for a visible repository\nconst VisibleFlag = \"VISIBLE\"\n\n// HiddenFlag is the cons...
go
edit
0
0
mit
2c333be0f110c91c4ea4e849c9844de7fe3ae2f5
k0pernicus/goyave
consts/consts.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/dynport/dgtk/cli\"\n\t\"github.com/phrase/phraseapp-go/phraseapp\"\n)\n\nfunc ApplyNonRestRoutes(r *cli.Router, cfg *phraseapp.Config) {\n\tr.Register(\"pull\", &PullCommand{Config: *cfg}, \"Download loc...
go
edit
15
1
mit
d3b8ebded88529ae95523d7529837b6c2ab27792
phrase/phraseapp-client,phrase/phraseapp-client
non_rest_routes.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage beanstalk\n\nimport \"sync\"\n\n// ConsumerPool maintains a pool of Consumer objects.\ntype ConsumerPool struct {\n\tC chan *Job\n\tconsumers []*Consumer\n\tsync.Mutex\n}\n\n// NewConsumerPool creates a pool of Consumer objects....
go
edit
21
2
bsd-3-clause
3043285bae5f621c7b92ea5ccad619590d271867
prep/beanstalk
consumer_pool.go
rejected_lint
Too many lint violations: 21
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage model\n\nimport (\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/skygeario/skygear-server/pkg/core/config\"\n)\n\ntype KeyType int\n\nconst (\n\t// NoAccessKey means no correct access key\n\tNoAccessKey KeyType = iota\n\t// APIAccessK...
go
edit
0
3
apache-2.0
446d4bd25367aaa46bb11a2317c5fbf980734639
SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server,SkygearIO/skygear-server
pkg/core/model/app.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage render\n\nimport (\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestRegisterDecoder(t *testing.T) {\n\tassert.NotNil(t, RegisterDecoder(\"too long\", nil))\n\tshort := \"s\"\n\tassert.NotNil(t, RegisterDecoder(s...
go
edit
6
1
apache-2.0
cdb28cf4335fa829b9ab040554c34bf3ac76f641
oakmound/oak,oakmound/oak,oakmound/oak
render/decoder_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\"os\"\n\n\t\"golang.org/x/tools/go/loader\"\n)\n\nfunc main() {\n\tvar conf loader.Config\n\n\tconf.CreateFromFilenames(\".\", os.Args[1:]...)\n\tp, err := conf.Load()\n\tif err != nil {\n\t\tfmt.Println(...
go
edit
3
4
mit
8bede4273a263b2b0f0af2ac06f78b17f80ea41d
divan/depscheck
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"os\"\n\t\"runtime/pprof\"\n\n\t\"github.com/hajimehoshi/ebiten\"\n\t\"github.com/ranchblt/labyrinthofthechimera/labyrinth\"\n)\n\n// Version is autoset from the build script\nvar Version stri...
go
edit
0
5
mit
a3feb3131f2021d4f5a09a110981377e2c1cbfe8
ranchblt/labyrinthofthechimera
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage server\n\nimport (\n\t\"context\"\n\t\"net/http\"\n\t\"path\"\n\n\t\"github.com/gin-gonic/gin\"\n\t\"gitlab-odx.oracle.com/odx/functions/api\"\n)\n\nfunc (s *Server) handleRouteDelete(c *gin.Context) {\n\tctx := c.MustGet(\"ctx\").(cont...
go
edit
12
3
apache-2.0
67719d691d596688fc606d189469ecece5e5e690
fnproject/fn,fnproject/fn,fnproject/fn
api/server/routes_delete.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2016 Zlatko Čalušić\n//\n// Use of this source code is governed by an MIT-style license that can be found in the LICENSE file.\n\n// Package sysinfo is a pure Go library providing Linux OS / kernel / hardware system information.\...
go
edit
72
1
mit
af76da8fca7f8a0f80f7b6f54d64362ab2415b43
zcalusic/sysinfo
sysinfo.go
rejected_lint
Too many lint violations: 72
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/bfirsh/whalebrew/cmd\"\n)\n\nfunc main() {\n\n\tif len(os.Args) > 1 {\n\t\t// Check if not command exists\n\t\tif _, _, err := cmd.RootCmd.Find(os.Args); err != nil {\n\t\t\t// Che...
go
edit
0
4
apache-2.0
10e10a0d172706241d350bfbfe9ac027006dbd86
3846masa/whalebrew,3846masa/whalebrew
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright © 2016 Sidharth Kshatriya\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
0
1
apache-2.0
ee383e2257b5b4a76efcef0ef4bced9755229a45
sidkshatriya/dontbug,sidkshatriya/dontbug
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"os\"\n\nfunc main() {\n\tparser := NewParser()\n\tvar err error\n\tif len(os.Args) < 2 {\n\t\terr = parser.ParseInput()\n\t} else {\n\t\terr = parser.ParseFile(os.Args[1])\n\t}\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}...
go
edit
3
3
mit
b33c088d266fd972a090029bb12d1509b1507d93
james9909/graphics-engine,james9909/graphics-engine
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage middleware\n\nimport (\n\t\"fmt\"\n\t\"github.com/gin-gonic/gin\"\n\t\"regexp\"\n)\n\n// Dynamic routing based on host given by a map.\nfunc VHOST(plan Plan) func(*gin.Context) {\n\tportmatch := regexp.MustCompile(\":.*$\")\n\treturn fu...
go
edit
3
4
mit
21c391cd7e97a2baf8d89457b64424744fa088dc
carbonsrv/carbon,vifino/carbon,vifino/carbon,carbonsrv/carbon,carbonsrv/carbon,vifino/carbon
modules/middleware/vhost.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t// import plugins to ensure they're bound into the executable\n\t_ \"github.com/30x/apidApigeeSync\"\n\t_ \"github.com/30x/apidVerifyAPIKey\"\n\t_ \"github.com/30x/apidGatewayDeploy\"\n\n\t// other imports\n\t\"githu...
go
edit
0
5
apache-2.0
4f2765c68f306c9f95afb59ff65a471ae1c8eb20
apid/apid,apid/apid,apid/apid-core,apid/apid-core,apid/apid
cmd/apid/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage bouncermain\n\nimport (\n\t\"net/http\"\n\t\"os\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github.com/op/go-logging\"\n)\n\nvar logger = logging.MustGetLogger(\"bouncer\")\n\nvar decoder = newDecoder()\n\nvar format = logging.MustStringFormatt...
go
edit
15
1
apache-2.0
cb5f63f336aa9db497f72cbae2b742bff4155d51
pjwerneck/bouncer
bouncermain/bouncer.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"fmt\"\n)\n\nvar UniqueId string\nvar heartbeatChan chan bool\n\nfunc processCommandLineArguments() (int, int, error) {\n\tvar hostId = flag.Int(\"hostId\", 0, \"The unique id for the host.\")\n\tvar por...
go
edit
0
5
isc
cb9d4254409a81f9520f9aab90acd7ced2d2f25d
pooya/craft
process/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://w...
go
edit
0
0
apache-2.0
e6fc0ed22d3f670597c9a363810d5e1dbd7f192e
vdemeester/containerd,estesp/containerd,thaJeztah/containerd,containerd/containerd,mikebrow/containerd,dmcgowan/containerd,thaJeztah/containerd,vdemeester/containerd,containerd/containerd,crosbymichael/containerd,dmcgowan/containerd,mikebrow/containerd,estesp/containerd,crosbymichael/containerd
client_windows_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"packaging/math\"\n)\n\nfunc main() {\n\txs := []float64{1, 2, 3, 4}\n\tavg := math.Average(xs)\n\tfmt.Println(avg)\n}\n\n```\n\nApply this change: Add alias in packaging example" }, { "role": "as...
go
edit
0
1
apache-2.0
50001effe889735d21610042062806aa61714407
jsenon/golearning
src/packaging/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage gapi\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\n\t\"github.com/grafana/grafana/pkg/api/dtos\"\n)\n\nfunc (c *Client) CreateUserForm(settings dtos.AdminCreateUserForm) error {\n\tdata, err ...
go
edit
9
5
apache-2.0
7a4d445c8640aaf050a281059143cef50ec8271c
raintank/grafana-api-golang-client
admin.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\"os\"\n\n\t\"github.com/kori/surt/pkg\"\n)\n\nfunc main() {\n\tswitch os.Args[1] {\n\tcase \"build\":\n\t\tfile := os.Args[2]\n\t\tp := pkg.Prepare(file)\n\t\tfmt.Println(p.Info.Name)\n\tcase \"add\":\n\t...
go
edit
0
3
isc
38ab565ef74832ddb8375b77db8b661fc71cc9f9
kori/surt,darthlukan/surt
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"github.com/hellofresh/kandalf/cmd\"\n)\n\nvar (\n\tversion string\n\tconfigPath string\n\tversionFlag bool\n)\n\nfunc main() {\n\tversionString...
go
edit
0
2
mit
8857d2a3ff761d0a8c846bb1afb80b4889bbad87
hellofresh/kandalf,hellofresh/kandalf
main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage newedit\n\nimport (\n\t\"os\"\n\t\"testing\"\n\n\t\"github.com/elves/elvish/eval\"\n)\n\nfunc TestNs(t *testing.T) {\n\tev := eval.NewEvaler()\n\ted := NewEditor(os.Stdin, os.Stdout, ev)\n\tev.Global.AddNs(\"edit\", ed.Ns())\n\n\tev.Eva...
go
edit
3
2
bsd-2-clause
488bbcb9a0210fb716275fb308356daaf0eb8b8e
elves/elvish,elves/elvish,elves/elvish,elves/elvish,elves/elvish
newedit/editor_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage composition\n\nimport (\n\t\"github.com/golang/mock/gomock\"\n\tmockhttp \"github.com/tarent/lib-compose/composition/mocks/net/http\"\n\t\"net/http\"\n\t\"testing\"\n)\n\nfunc Test_CacheInvalidationHandler_Invalidation(t *testing.T) {\n...
go
edit
12
1
mit
e144c966cab7ef8d4945c47bf6c03899b6f9c553
tarent/lib-compose,tarent/lib-compose,tarent/lib-compose
composition/cache_invalidation_handler_test.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cc_messages\n\nimport \"time\"\n\ntype LRPInstanceState string\n\nconst (\n\tLRPInstanceStateStarting LRPInstanceState = \"STARTING\"\n\tLRPInstanceStateRunning LRPInstanceState = \"RUNNING\"\n\tLRPInstanceStateCrashed LRPInstanceStat...
go
edit
0
0
apache-2.0
cbbb5a3dce743d72399a1dc49630090a55e1b0d4
cloudfoundry-incubator/runtime-schema
cc_messages/lrp_instance.go
rejected_duplicate
Near-duplicate of sample 116768
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Jeff Martinez. All rights reserved.\n// Use of this source code is governed by a\n// license that can be found in the LICENSE.txt file\n// or at http://opensource.org/licenses/MIT\n\npackage storage\n\nimport (\n\t\"fmt\"\n\n\...
go
edit
3
3
mit
843f0d4612cd2ee120b227a03b55aa7b1569e846
jeffbmartinez/analyzedata,jeffbmartinez/analyzedata
storage/uploads.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"github.com/codegangsta/cli\"\n\t. \"github.com/tendermint/go-common\"\n\t\"github.com/tendermint/tmsp/server\"\n\t\"os\"\n\n\tapplication \"github.com/tendermint/merkleeyes/app\"\n)\n\nfunc main() {\n\tapp := cli.N...
go
edit
6
2
apache-2.0
75b1585be48e1d8d3a27bde635f33a22893c04ea
tendermint/merkleeyes,tendermint/merkleeyes
cmd/merkleeyes/merkleeyes.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage db\n\nimport (\n\t\"database/sql\"\n\t\"fmt\"\n\n\t\"github.com/rafaeljusto/cctldstats/config\"\n)\n\n// Connection database connection.\nvar Connection *sql.DB\n\n// Connect performs the database connection. Today the following databas...
go
edit
0
3
mit
fb3bfa09e7af7b4bd1fc2766ea8a6cf2baea6731
rafaeljusto/cctldstats
db/db.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage parser\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n)\n\ntype ParseError struct {\n\t// starts with 1\n\tLine uint\n\tColumn uint\n\n\tMsg string\n\n\tSrc string\n}\n\nfunc (p *ParseError) Error() string {\n\treturn fmt.Sprintf(\"[%d:%d]: %...
go
edit
0
1
mit
13698b7b1f38ebc2a6b94985df740215321ed370
elpinal/coco3
extra/parser/errors.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cmdtest\n\nimport (\n\t\"io/ioutil\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n)\n\nfunc Build(mainPath string, args ...string) (string, error) {\n\treturn BuildIn(os.Getenv(\"GOPATH\"), mainPath, args...)\n}\n\nfunc BuildIn(gopath...
go
edit
0
4
apache-2.0
f460c300cbafcadf65edff59285d6bd346b9fc16
vito/cmdtest
build.go
accepted
null
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\npackage semtech\n\nimport (\n\t. \"github.com/thethingsnetwork/core/utils/testing\"\n\t\"testing\"\n)\n\...
go
edit
30
2
mit
3a114e9550073cf66c07f9656d13277607c7027e
TheThingsNetwork/ttn,LoRaWanSoFa/ttn,mgranberry/ttn,TheThingsNetwork/ttn,TheThingsNetwork/ttn,mgranberry/ttn,LoRaWanSoFa/ttn,jvanmalder/ttn,jvanmalder/ttn,mgranberry/ttn,jvanmalder/ttn
adapters/semtech/adapter_test.go
rejected_lint
Too many lint violations: 30
true
[ { "role": "user", "content": "Here is the current file:\n```go\n/*\nCopyright 2018 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
2
apache-2.0
4c9fe1bade31c0a9ba3e35ddaf81613de97dbbdf
bskiba/autoscaler,mmerrill3/autoscaler,kubernetes/autoscaler,mmerrill3/autoscaler,mmerrill3/autoscaler,mmerrill3/autoscaler,kubernetes/autoscaler,bskiba/autoscaler,bskiba/autoscaler,kubernetes/autoscaler,kubernetes/autoscaler
vertical-pod-autoscaler/pkg/admission-controller/certs.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"errors\"\n\n\t\"code.cloudfoundry.org/bbs/format\"\n)\n\nfunc (*VolumePlacement) Version() format.Version {\n\treturn format.V1\n}\n\nfunc (*VolumePlacement) Validate() error {\n\treturn nil\n}\n\n// while volume...
go
edit
12
7
apache-2.0
ab4fddb895d221ecbbb096b43a5ece3d193dfdc0
cloudfoundry-incubator/bbs,cloudfoundry-incubator/bbs
models/volume_mount.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\"log\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/jasonlvhit/gocron\"\n)\n\nfunc main() {\n\tscheduler := gocron.NewScheduler()\n\tscheduler.Every(1).Day().At(\"00:00\").Do(runSchedulerTask, nil)\n\t<-schedu...
go
edit
6
5
mit
6ef2491e2edce6d001fd49def5240b770026abb4
rafaeljusto/toglacier,rafaeljusto/toglacier,rafaeljusto/toglacier
toglacier.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage router\n\nimport (\n\t\"encoding/base64\"\n\t\"testing\"\n)\n\nconst (\n\tHost = \"1.2.3.4\"\n\tPort = 1234\n\n\tSessionKey = \"14fbc303b76bacd1e0a3ab641c11d114\"\n\n\tSession = \"QfahjQKyC6Jxb/JHqa1kZAAAAAAAAAAAAAAAAAAAAAA=\"\n)\n\nfun...
go
edit
12
2
apache-2.0
81cbba68d09edf8c1ab70f439f1254f238e1ab16
dramich/cf-bigip-ctlr,ryan-talley/cf-bigip-ctlr,ryan-talley/cf-bigip-ctlr,ryan-talley/cf-bigip-ctlr,ryan-talley/cf-bigip-ctlr,dramich/cf-bigip-ctlr,dramich/cf-bigip-ctlr,dramich/cf-bigip-ctlr
perf_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\"github.com/BytemarkHosting/bytemark-client/lib\"\n\t\"github.com/BytemarkHosting/bytemark-client/mocks\"\n\t\"github.com/urfave/cli\"\n)\n\nvar defVM lib.VirtualMachineName\nvar defGroup lib.GroupName\n\nfunc baseT...
go
edit
9
3
mit
dfd6d4a85181cd463b57dbc3fb9a6fb17ed6d212
BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client,BytemarkHosting/bytemark-client
cmd/bytemark/main_test.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage stack\n\nimport (\n\t\"runtime\"\n\t\"testing\"\n)\n\nfunc TestFindSigpanic(t *testing.T) {\n\tt.Parallel()\n\tsp := findSigpanic()\n\tif got, want := sp.Name(), \"runtime.sigpanic\"; got != want {\n\t\tt.Errorf(\"got == %v, want == %v\...
go
edit
18
4
mit
92409766a3c69ef9024f729c59a2514316dc88a8
go-stack/stack
stackinternal_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage views\n\nconst list = `\n<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"utf-8\" />\n <title>alexandria</title>\n <link rel=\"stylesheet\" href=\"/assets/styles.css\" />\n </head>\n\n <body>\n <h1>alexandria</h1>\n\n ...
go
edit
0
0
mit
ae01a3dc387a96fefd6595f031ea50e253126225
hawx/alexandria,hawx/alexandria
web/views/list.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage goNessus\n\ntype Nessus struct {\n\tIp string\n\tPort string\n\tAccessKey string\n\tSecretKey string\n\tToken string\n}\n\n```\n\nApply this change: Add godocs for the client struct" }, { "role": "assistant", ...
go
edit
0
0
apache-2.0
30c0200fb35e73377c62888fafb6702bac1df343
kkirsche/go-nessus
client_structs.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage configuration\n\nimport \"flag\"\n\nfunc FromCommandLineArgs() *ApplicationConfiguration {\n\thostPort := flag.String(\"hostPort\", \":9000\", \"Host:port of the greenwall HTTP server\")\n\tstaticDir := flag.String(\"staticDir\", \"fron...
go
edit
6
1
mit
27a30ad59a93c22962db76c69f49bc46b4a9e7f8
mtojek/greenwall,mtojek/greenwall
middleware/configuration/command_line_args.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage scipipe\n\nimport (\n\t// \"github.com/go-errors/errors\"\n\t//\"os\"\n\t\"os/exec\"\n\tre \"regexp\"\n)\n\nfunc ExecCmd(cmd string) {\n\tInfo.Println(\"Executing command: \", cmd)\n\tcombOutput, err := exec.Command(\"bash\", \"-lc\", c...
go
edit
6
2
mit
f959081f681ba63c006eeb0dbc77a21f8d5b22c3
scipipe/scipipe,scipipe/scipipe,samuell/scipipe
utils.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage netutils\n\nimport (\n\t\"testing\"\n)\n\nfunc TestAllocateIP(t *testing.T) {\n\tipa, err := NewIPAllocator(\"10.1.2.0/24\")\n\tif err != nil {\n\t\tt.Fatal(\"Failed to initialize IP allocator: %v\", err)\n\t}\n\tt.Log(ipa.GetIP())\n}\n...
go
edit
6
8
apache-2.0
b53161eb2a8b28016d80a87472201667bce4841c
danwinship/openshift-sdn,rootfs/origin,deads2k/origin,dmage/origin,dinhxuanvu/origin,dobbymoodge/origin,stevekuznetsov/origin,nak3/origin,gabemontero/origin,markllama/origin,kargakis/origin,goern/origin,dmage/origin,mdshuai/openshift-sdn,tnozicka/origin,xiuwang/origin,tracyrankin/origin,hferentschik/origin,jprukner/ori...
pkg/netutils/ip_allocator_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage split\n\nimport (\n\t\"bytes\"\n\t\"mime\"\n\t\"mime/multipart\"\n\t\"net/http\"\n\t\"net/textproto\"\n)\n\n// WriteResponses serialize the responses passed as argument into the ResponseWriter\nfunc WriteResponses(w http.ResponseWriter,...
go
edit
6
3
mit
376283d9b93d7e99a61a630c42b8feb9e60bb459
aarnone/httpbatcher
split/responses_packer.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage domain\n\nimport \"time\"\n\n// Trace represents a full trace of a request\n// comprised of a number of frames\ntype Trace []Frame\n\n// FrameType represents an Enum of types of Events which Phosphor can record\ntype FrameType int\n\nco...
go
edit
3
0
apache-2.0
82ada726b6e4b28a0e0d553127173e8ac2f6c827
mattheath/phosphor,mondough/phosphor,mattheath/phosphor,mondough/phosphor
domain/domain.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cml\n\nimport (\n\t\"github.com/dgryski/go-farm\"\n\t\"github.com/lazybeaver/xorshift\"\n)\n\nvar rnd = xorshift.NewXorShift64Star(42)\n\nfunc randFloat() float64 {\n\treturn float64(rnd.Next()%10e5) / 10e5\n}\n\nfunc hash(s []byte, i, ...
go
edit
6
1
mit
07b04c7a0112bcb7430f4277772d03a918963f51
seiflotfy/count-min-log,seiflotfy/cmsketch
utils.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\"github.com/stretchr/testify/assert\"\n\t\"io/ioutil\"\n\t\"testing\"\n)\n\nfunc TestSavingAssignment(t *testing.T) {\n\ttmpDir, err := ioutil.TempDir(\"\", \"\")\n\tassert.NoError(t, err)\n\n\tassignment := Assignm...
go
edit
6
1
mit
641a383de83ab026f6c14a51bb1185fbbe32e661
lcowell/cli,Tonkpils/cli,neslom/cli,zabawaba99/cli,arvidsaur/cli,exercism/cli,lcowell/cli,zabawaba99/cli,arvidsaur/cli,Tonkpils/cli,yeah-right/cli,neslom/cli,arvidsaur/cli,neslom/cli,yeah-right/cli,Tonkpils/cli,zabawaba99/cli,lcowell/cli,yeah-right/cli,exercism/cli
assignment_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\"github.com/grsakea/kappastat/common\"\n\t\"github.com/mrshankly/go-twitch/twitch\"\n\t\"log\"\n\t\"time\"\n)\n\nfunc loopViewers(client *twitch.Client, c chan Message, infos chan kappastat.ViewerCount) {\n\tfollowe...
go
edit
12
5
mit
960c91c8cdda43751abd8494d5277292711d9469
grsakea/kappastat,grsakea/kappastat,grsakea/kappastat
backend/viewers.go
rejected_lint
Too many lint violations: 12
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright (c) 2015, Peter Mrekaj. All rights reserved.\n// Use of this source code is governed by a MIT-style\n// license that can be found in the LICENSE.txt file.\n\npackage graphs\n\ntype state byte\n\nconst (\n\tundiscovered state = iota...
go
edit
0
6
mit
c6691557cbbdc0d1358b0b6c2031b89f3acbf136
mrekucci/epi,mrekucci/epi
graphs/minconnected.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage agentlogger_test\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"os\"\n\t\"syscall\"\n\n\t\"github.com/cloudfoundry/bosh-agent/infrastructure/agentlogger\"\n\t\"github.com/cloudfoundry/bosh-utils/logger\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \...
go
edit
15
1
apache-2.0
01c91bef6938e4e4db78fa8e6b2a6b58215140b3
cloudfoundry/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,mattcui/bosh-agent,cloudfoundry/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent,gu-bin/bosh-agent
infrastructure/agentlogger/signalable_logger_test.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 Alex Browne. 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\n// Package zoom is a blazing-fast datastore and querying engine for\n// Go built on ...
go
edit
15
2
mit
8ae18ede39728d61830544ae795a7fa36bf42ea6
albrow/zoom
zoom.go
rejected_lint
Too many lint violations: 15
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\n\t\"github.com/achilleasa/go-pathtrace/tracer/opencl\"\n\t\"github.com/codegangsta/cli\"\n)\n\n// List available opencl devices.\nfunc ListDevices(ctx *cli.Context) {\n\tvar storage []byte\n\tb...
go
edit
6
4
mit
568a305bc9fdf370d7afab3bf46989182d73f1ce
achilleasa/go-pathtrace,achilleasa/go-pathtrace,achilleasa/go-pathtrace
cmd/list_devices.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage middleware\n\nimport (\n\t\"net/http\"\n\n\t\"github.com/zenazn/goji/web\"\n)\n\ntype subrouter struct {\n\tc *web.C\n\th http.Handler\n}\n\nfunc (s subrouter) ServeHTTP(w http.ResponseWriter, r *http.Request) {\n\tif s.c.URLParams != n...
go
edit
0
4
mit
863ba3029d64b5ec1ab68b383249dd4c044b3838
zenazn/goji,dbmlabs/goji,yangou/goji,beni55/goji,Invacio/goji,vsco/goji,cognusion/goji,w4ngyi/goji,tchssk/goji,unixorn/goji
web/middleware/subrouter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage batch\n\nimport \"sync\"\n\n// MockItemGenerator generates mock Items with unique IDs. Items are generated in a\n// separate goroutine and added to a channel, which can be retrieved by calling\n// GetCh.\ntype MockItemGenerator struct {...
go
edit
9
4
mit
2eb8c83adffb1796ea00e83e9b6794abe30baf33
MasterOfBinary/gobatch
batch/item_mock.go
rejected_lint
Too many lint violations: 9
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage socket\n\nimport (\n\t\"time\"\n\t\"github.com/neliseev/logger\"\n)\n\n// Defaults vars\nvar msgSep = byte(\":\")\n\n// Constants\nconst maxTCPQueries int = 256\nconst tcpIdleTimeout time.Duration = 60 * time.Second\nconst rt...
go
edit
0
1
mit
2bf3be675739e3e2794239f9e6463cd9d48e3a97
neliseev/socket
defaults.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage runner\nimport (\n\t\"net/http\"\n\t\"fmt\"\n\t\"sync\"\n\t\"github.com/dudang/golt/parser\"\n)\n\n\nfunc ExecuteJsonGolt(testPlan parser.GoltJsons) {\n\tfor _, element := range testPlan.Golt {\n\t\texecuteElement(element)\n\t}\n}\n\nfu...
go
edit
0
2
mit
8fd714e2da341766cbb44aac635c614a55003deb
dudang/golt
runner/runner.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage vizzini_test\n\nimport (\n\t\"code.cloudfoundry.org/bbs/models\"\n\t. \"github.com/onsi/ginkgo\"\n\t. \"github.com/onsi/gomega\"\n)\n\nvar _ = Describe(\"Cells\", func() {\n\tIt(\"should return all cells\", func() {\n\t\tcells, err := b...
go
edit
18
3
apache-2.0
47be27ccd4e907bbf90ee9d33ab263866c26357d
cloudfoundry-incubator/vizzini,cloudfoundry-incubator/vizzini,pivotal-cf-experimental/vizzini,pivotal-cf-experimental/vizzini
cells_test.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage request\n\nimport (\n\t\"context\"\n\t\"github.com/ory/fosite\"\n\t\"github.com/ory/fosite/handler/oauth2\"\n\t\"github.com/ory/fosite/handler/openid\"\n)\n\n// Manager provides a generic interface to clients in order to build a DataSto...
go
edit
0
0
apache-2.0
c986e37d3f5d5d8c918e2a1a52bba58162ba3b4d
MatthewHartstonge/storage
request/request_manager.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage trello\n\ntype ByFirstEntered []*ListDuration\n\nfunc (durs ByFirstEntered) Len() int { return len(durs) }\nfunc (durs ByFirstEntered) Less(i, j int) bool {\n\treturn durs[i].FirstEntered.Before(durs[j].FirstEntered)\n}\nfunc (durs ByFi...
go
edit
3
1
mit
3ad8e58b7dbf222403235021cc397e351b790582
adlio/trello
list-duration-sort.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// Copyright 2015 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.a...
go
edit
0
1
apache-2.0
0b7f4888b0e336ae1d2dbfc1b499888d764a3124
prometheus/client_golang
examples/simple/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mccli\n\nimport \"github.com/codegangsta/cli\"\n\nvar DownloadCommand = cli.Command{\n\tName: \"download\",\n\tAliases: []string{\"down\", \"d\"},\n\tUsage: \"Downloads files, directories or projects\",\n\tSubcommands: []cli.Comman...
go
edit
6
0
mit
dd573be853474dae1d39a99f5aa7f1987e3dfcf9
materials-commons/mcstore,materials-commons/mcstore,materials-commons/mcstore
cmd/mccli/download_cmd.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\"github.com/gbl08ma/disturbancesmlx/dataobjects\"\n\t\"github.com/gbl08ma/disturbancesmlx/scraper\"\n)\n\nvar annStore AnnouncementStore\n\n// AnnouncementStore implements dataobjects.AnnouncementStore\ntype Announc...
go
edit
0
3
apache-2.0
612c4db4d5ad057730ca61ed643a733b7fec22b0
gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx,gbl08ma/disturbancesmlx
announcements.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build linux aix\n// +build !js\n\npackage logrus\n\nimport \"golang.org/x/sys/unix\"\n\nconst ioctlReadTermios = unix.TCGETS\n\nfunc isTerminal(fd int) bool {\n\t_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)\n\treturn err == nil\n}\n...
go
edit
0
1
mit
be16a810967bb89bf12f1e838112785fe0a851d2
Sirupsen/logrus,penhauer-xiao/logrus,sirupsen/logrus,sirupsen/logrus,penhauer-xiao/logrus
terminal_check_unix.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage slack\n\n// ContextBlock defines data that is used to display message context, which can\n// include both images and text.\n//\n// More Information: https://api.slack.com/reference/messaging/blocks#actions\ntype ContextBlock struct {\n\...
go
edit
18
1
bsd-2-clause
70cc52f880604a274e60d10c0c9c71d4e8070dfd
nlopes/slack,james-lawrence/slack,178inaba/slack
block_context.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage cmd\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n)\n\ntype Cmd interface {\n\tRun(name string, args ...string) (string, string, error)\n\tStart(name string, args ...string) (Cmd, error)\n\tWait() error\n\tOutput(name string, args ...string) (...
go
edit
3
2
mit
705103a553e1ec634158deb081b4156a629f102e
marcosnils/cmt,marcosnils/cmt
cmd/cmd.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage adapt\n\n// Config represents a configuration of the algorithm.\ntype Config struct {\n\t// The refinement rate of the algorithm. The parameter specifies the\n\t// fraction of the nodes queued for refinement to be taken from the queue a...
go
edit
0
1
mit
cb72581a19a259b2eac58c2fcdd361ae3764fae5
ready-steady/adapt
config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mdb\n\nfunc (dest *Machine) updateFrom(source Machine) {\n\tif dest.Hostname != source.Hostname {\n\t\treturn\n\t}\n\tif source.IpAddress != \"\" {\n\t\tdest.IpAddress = source.IpAddress\n\t}\n\tif source.RequiredImage != \"\" {\n\t\tde...
go
edit
3
9
apache-2.0
746064bba56d7e3d1dd44317e00d93d28bb9a526
keep94/Dominator,rgooch/Dominator,keep94/Dominator,Symantec/Dominator,rgooch/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator
lib/mdb/updateFrom.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\n// +build OMIT\n\npackage main\n\nimport (\n\t\"fmt\"\n\t\"sync\"\n\t\"time\"\n)\n\n// SafeCounter is safe to use concurrently.\ntype SafeCounter struct {\n\tv map[string]int\n\tmux sync.Mutex\n}\n\n// Inc increments the counter for the given...
go
edit
0
2
bsd-3-clause
2e616b842c1127f0f4f1e49fcf2765d347bcaea1
golang/tour,zorion/go-tour-ca,zorion/go-tour-ca,dupoxy/go-tour-fr,dupoxy/go-tour-fr,dupoxy/go-tour-fr
content/concurrency/mutex-counter.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport (\n\t\"flag\"\n\t\"log\"\n\t\"net/http\"\n)\n\nvar pubAddr = flag.String(\"pubAddr\", \":8080\", \"Address on which to serve public requests\")\nvar apiAddr = flag.String(\"apiAddr\", \":8081\", \"Address on which to rece...
go
edit
3
2
mit
f1aa2ea7bf9f2d25a361aaba017da45044531bd3
nickstenning/router-archive,lukaszraczylo/router,lukaszraczylo/router,alphagov/router
command/router/main.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage mbr\n\n// Type constants for the GUID for type of partition, see https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_entries\ntype Type byte\n\n// List of GUID partition types\nconst (\n\tEmpty Type = 0x00\n\tFat12 ...
go
edit
0
0
mit
fbae2dba2ba0f095e7ebba7a07a0751448d39061
diskfs/go-diskfs
partition/mbr/types.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage sqlite3\n\nimport (\n\t\"database/sql\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path\"\n\t\"testing\"\n)\n\nfunc TestFailures(t *testing.T) {\n\tdirName, err := ioutil.TempDir(\"\", \"sqlite3\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\tdefe...
go
edit
6
6
mit
e0729751ac189f746a0322b36e0f33911e624846
larsmans/go-sqlite3,gmarik/go-sqlite3,danderson/go-sqlite3,joewalnes/go-sqlite3,danderson/go-sqlite3,wuranbo/go-sqlite3,Schumix/go-sqlite3,marccampbell/go-sqlite3,mdevan/go-sqlite3,mdevan/go-sqlite3,shaxbee/go-sqlite3,xeodou/go-sqlcipher,kiwih/go-sqlite3,jabgibson/go-sqlite3,mattn/go-sqlite3,shaxbee/go-sqlite3,Jonathan...
error_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage configurations\n\nimport (\n\t\"os\"\n\t\"os/user\"\n\t\"path\"\n)\n\nvar applicationName = \"banksaurus\"\n\n// IsDev returns if in dev environment or not\nfunc IsDev() bool {\n\tif os.Getenv(\"GO_BANK_CLI_DEV\") == \"true\" {\n\t\tret...
go
edit
0
2
mit
abc47d4e0a720a25233450619ba2a461ba8f4ccb
luistm/expensetracker,luistm/go-bank-cli
cmd/banksaurus/configurations/configurations.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage drain\n\nimport (\n\t\"fmt\"\n\t\"regexp\"\n\t\"strconv\"\n)\n\ntype LogplexError struct {\n\tCode int // L11, L12, etc.\n\tCount int // Count of logs referenced in the error\n\tMsg string\n}\n\nfunc parseLogplexError(msg string) (*L...
go
edit
0
5
mit
709b0efdc4d70a49e67d60ef31bd24dc8ce169b1
heroku/drain
lerror.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage servo\n\nimport \"net/http\"\n\n// The Server is responsible for running the server process.\n// It can be injected via the goldi type \"kernel.server\"\ntype Server interface {\n\t// Run starts the server and blocks until it has finish...
go
edit
6
1
mit
e72181571c442e9cc84439352e986a510cc61eec
fgrosse/servo,fgrosse/servo
server.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage store\n\nimport (\n\t\"errors\"\n\n\tconsul \"github.com/armon/consul-api\"\n)\n\ntype ConsulStore struct {\n\tClient *consul.Client\n}\n\nfunc (c *ConsulStore) Get(key string) (Item, error) {\n\tkv, _, err := c.Client.KV().Get(key, nil...
go
edit
18
3
apache-2.0
4a4bdcb83ba0afecd1d1b69bd882c8ed90030491
uffy/go-micro,micro/go-micro,gpavlidi/go-micro,Taik/go-micro,kgrvamsi/go-micro,divisionone/go-micro,iheitlager/go-micro,jmptrader/go-micro,myodc/go-micro
store/consul_store.go
rejected_lint
Too many lint violations: 18
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nimport \"github.com/BurntSushi/toml\"\n\ntype Config struct {\n\tApp App `toml:\"application\"`\n\tDeps Deps `toml:\"dependencies\"`\n}\n\ntype App struct {\n\tName string\n\tVersion string\n\tAuthors []string\n}\n\ntype De...
go
edit
3
2
mit
74788afc2b0f03051b0fd92db0c0d1664dffd28c
jingweno/nut
config.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage dataBase\n\nimport \"Jira__backend/models\"\n\nvar UsersListFromFakeDB = models.Users{\n\tmodels.User{Name: \"User1\", Data: \"21.08.1997\", Phone: \"8(999)999-99-99\"},\n\tmodels.User{Name: \"User2\", Data: \"10.01.1997\", Phone: \"8(9...
go
edit
0
0
mit
bb6d294cb978864b28d05d12308867039509c87f
DVI-GI-2017/Jira__backend
dataBase/fakeUserDB.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage multitemplate\n\nimport (\n\t\"text/template\"\n\t\"text/template/parse\"\n\n\t\"github.com/acsellers/multitemplate\"\n)\n\ntype defaultParser struct{}\n\nfunc (ms *multiStruct) ParseTemplate(name, src string, funcs template.FuncMap) (m...
go
edit
3
5
bsd-2-clause
e9198d76b5defec077706b94b7d832c4f4c12523
acsellers/multitemplate,acsellers/multitemplate
stdlib.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage goref\n\nimport (\n\t\"github.com/stretchr/testify/assert\"\n\t\"go/ast\"\n\t\"testing\"\n)\n\nfunc TestCleanImportSpec(t *testing.T) {\n\tassert.Equal(t, \"foo/bar/baz\", cleanImportSpec(&ast.ImportSpec{Path: &ast.BasicLit{Value: \"foo...
go
edit
0
1
apache-2.0
f97a196a40767fc931ecab2c9e9486674a8177d8
korfuri/goref
loadpath_test.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage main\n\nvar APPCONTENT = `package main\n \nimport (\n\t\"net/http\"\n\t\"log\"\n)\n\nfunc main() {\n\tmux := http.NewServeMux()\n\n\tmux.HandleFunc(\"/\", DefaultHandler)\n\n\tlog.Panic(http.ListenAndServe(\":8080\", mux))\n}\n\nfunc De...
go
edit
0
0
mit
18dfa036b24c90548aa9e8d6157bf9feb324c889
squiidz/flea
content.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage handlers\n\nimport (\n\t\"net/http\"\n\t\"net/http/httptest\"\n\t\"testing\"\n)\n\nfunc TestLogoutHandler(t *testing.T) {\n\tsetUp(\"/config/testing/handler_logout_url.yml\")\n\thandler := http.HandlerFunc(LogoutHandler)\n\n\ttests := [...
go
edit
6
5
mit
0399746b4eeefaf599079643f5710b4fb76a4733
bnfinet/lasso,bnfinet/lasso
handlers/logout_test.go
rejected_lint
Too many lint violations: 6
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage httpd\n\nimport (\n\t\"fmt\"\n\t\"github.com/Symantec/Dominator/sub/scanner\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n)\n\ntype HtmlWriter interface {\n\tWriteHtml(writer io.Writer)\n}\n\nvar onlyHtmler HtmlWriter\n\nfunc StartServer(port...
go
edit
3
2
apache-2.0
53fc6712cedfc1b0f9aa4623ac953162c61599d7
keep94/Dominator,Symantec/Dominator,Symantec/Dominator,keep94/Dominator,Symantec/Dominator,keep94/Dominator,rgooch/Dominator,rgooch/Dominator,rgooch/Dominator
sub/httpd/api.go
accepted
null
true
[ { "role": "user", "content": "Here is the current file:\n```go\npackage models\n\nimport (\n\t\"github.com/jinzhu/gorm\"\n\t\"github.com/qor/accessibility/hyperlink\"\n)\n\ntype Article struct {\n\tgorm.Model\n\tAuthor User\n\tAuthorID uint\n\tTitle string\n\tContent string `gorm:\"type:text\"`\n\tFro...
go
edit
0
0
mit
7257a8c0978aa02f7807d7a68ea8880681b5a42c
firestudios/qor-example,qor/qor-example,qor/qor-example,firestudios/qor-example,qor/qor-example,firestudios/qor-example
app/models/blog.go
accepted
null
true